Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ymouzakis committed Sep 25, 2024
1 parent 1fec765 commit fa7d891
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/pharos/src/components/toast/pharos-toaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,6 @@ export class PharosToaster extends ScopedRegistryMixin(PharosElement) {
}

private _escapeToastContent(input: string): string {
// For XSS protection, we need to escape any HTML that is not wrapped in a "-pharos-" tag
// const escapeChars = (str: string) => str.replace(/&/g, '&')
// .replace(/</g, '&lt;')
// .replace(/>/g, '&gt;')
// .replace(/"/g, '&quot;')
// .replace(/'/g, '&#39;');

// Check if the input string contains any tag with "-pharos-"
const isWrappedWithPharosTag = (str: string) => {
const tagPattern = /<\/?[^<]*-pharos-[^<]*?>/;
Expand Down

0 comments on commit fa7d891

Please sign in to comment.