Skip to content

Commit

Permalink
LPS-84268 Let sanitizer allow * character in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerWoo committed Aug 24, 2018
1 parent fe296ab commit fe567cc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ processSanitizerConfiguration {
}

if (line.contains('<regexp name="onsiteURL" value=')) {
line = ' <regexp name="onsiteURL" value="^(?![\\p{L}\\p{N}\\\\\\.\\#@\\$%\\+&amp;;\\-_~,\\?=/!]*(&amp;colon))[\\p{L}\\p{N}\\\\\\.\\#@\\$%\\+&amp;;\\-_~,\\?=/!]*"/>'
line = ' <regexp name="onsiteURL" value="^(?![\\p{L}\\p{N}\\\\\\.\\#@\\$%\\*\\+&amp;;\\-_~,\\?=/!]*(&amp;colon))[\\p{L}\\p{N}\\\\\\.\\#@\\$%\\*\\+&amp;;\\-_~,\\?=/!]*"/>'
}
else if (line.contains('<regexp name="offsiteURL" value=')) {
line = ' <regexp name="offsiteURL" value="(\\s)*((ht|f)tp(s?)://|mailto:)[\\p{L}\\p{N}]+[\\p{L}\\p{N}\\p{Zs}\\.\\#@\\$%\\*\\+&amp;;:\\-_~,\\?=/!\\(\\)]*(\\s)*"/>'
}
else if (line.contains('<tag-rules>')) {
line = """\
Expand Down

0 comments on commit fe567cc

Please sign in to comment.