mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-30 17:44:30 +01:00
fix: parse embeddable srcdoc urls strictly (#7884)
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import { sanitizeUrl } from "@braintree/sanitize-url";
|
||||
|
||||
export const sanitizeHTMLAttribute = (html: string) => {
|
||||
return html.replace(/"/g, """);
|
||||
};
|
||||
|
||||
export const normalizeLink = (link: string) => {
|
||||
link = link.trim();
|
||||
if (!link) {
|
||||
return link;
|
||||
}
|
||||
return sanitizeUrl(link);
|
||||
return sanitizeUrl(sanitizeHTMLAttribute(link));
|
||||
};
|
||||
|
||||
export const isLocalLink = (link: string | null) => {
|
||||
|
||||
Reference in New Issue
Block a user