Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mgurgel committed Nov 29, 2024
1 parent 6291194 commit 7484698
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions v2/components/protection-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ import { CheckBrokenSiteReportHandledMessage } from '../../shared/js/browser/com
import { duckDuckGoURLs } from '../../shared/data/constants';

/**
* @param {string} urlString
* @param {string} urlString
* @returns {string}
*/
const sanitizeAndEncodeURL = (urlString) => {
if (!urlString) return '';

try {
const url = new URL(urlString);

return encodeURIComponent(`${url.origin}${url.pathname}`);
} catch (error) {
return '';
}
}
};

export function BreakageFormLink() {
const { push } = useNav();
Expand Down

0 comments on commit 7484698

Please sign in to comment.