Skip to content

Commit 2e31cda

Browse files
committed
adjust url pattern
1 parent 094b7f4 commit 2e31cda

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/javascript/elements/html_editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const DROP_ATTRS = [
111111
'background', 'data', 'cite', 'ping', 'longdesc', 'manifest', 'profile'
112112
]
113113

114-
const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{)/i
114+
const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{|#)/i
115115

116116
function isSafeAttr (name, value) {
117117
const lowerName = name.toLowerCase()

app/javascript/template_builder/dynamic_editor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const DROP_ATTRS = [
103103
'background', 'data', 'cite', 'ping', 'longdesc', 'manifest', 'profile'
104104
]
105105

106-
const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{)/i
106+
const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{|#)/i
107107

108108
function isSafeAttr (name, value) {
109109
const lowerName = name.toLowerCase()

0 commit comments

Comments
 (0)