We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ab4d71 commit 12ef60eCopy full SHA for 12ef60e
src/components/gtt-client/init/controls.ts
@@ -43,9 +43,9 @@ function setSearchControl(instance: any): void {
43
if (response.reverse) {
44
// Add copy to clipboard functionality, if available
45
if (navigator.clipboard) {
46
- // strip htmls from response title
+ // Sanitize response title and remove all HTML tags
47
const sanitizedTitle = DOMPurify.sanitize(response.title, { ALLOWED_TAGS: [] });
48
- const text = sanitizedTitle.replace(/<[^>]*>?/gm, '');
+ const text = sanitizedTitle.replace(/<\/?[^>]+(>|$)/g, '');
49
navigator.clipboard.writeText(text);
50
instance.map.notification.show(instance.i18n.control.copied_location_to_clipboard);
51
}
0 commit comments