diff --git a/src/services/html_sanitizer.ts b/src/services/html_sanitizer.ts index c0ebaf152..11bf9e42d 100644 --- a/src/services/html_sanitizer.ts +++ b/src/services/html_sanitizer.ts @@ -175,8 +175,12 @@ function sanitize(dirtyHtml: string) { border: [ /^\s*\d+(?:px|em|%)\s*(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset)\s*(#(0x)?[0-9a-fA-F]+|rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)|hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\))\s*$/ ] + }, + col: { + width: sizeRegex } }, + selfClosing: [ "img", "br", "hr", "area", "base", "basefont", "input", "link", "meta", "col" ], allowedSchemes: ALLOWED_PROTOCOLS, nonTextTags: ["head"], transformTags diff --git a/src/services/import/markdown.spec.ts b/src/services/import/markdown.spec.ts index f6b541163..fd2de9912 100644 --- a/src/services/import/markdown.spec.ts +++ b/src/services/import/markdown.spec.ts @@ -197,4 +197,9 @@ second line 2
1 | ![]() | Go to any location on openstreetmap.org and right click to bring up the context menu. Select the “Show address” item. |
2 | ![]() | The address will be visible in the top-left of the screen, in the place of the search bar. Select the coordinates and copy them into the clipboard. |
3 | ![]() | Simply paste the value inside the text box into the #geolocation attribute of a child note of the map and then it should be displayed on the map. |