Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
364 changes: 194 additions & 170 deletions src/main/resources/antisamy-anythinggoes.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/resources/antisamy-ebay.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<regexp name="onsiteURL"
value="^(?!//)(?![\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*(&amp;colon))[\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*" />
<regexp name="offsiteURL"
value="(\s)*((ht|f)tp(s?)://|mailto:)[\p{L}\p{N}]+[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;;:\-_~,\?=/!\(\)]*(\s)*" />
value="\s*+(?:(?:https?|ftps?)://|mailto:)[\p{L}\p{N}]++[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;:,\-_~,\?=/!\(\)]*+\s*+" />

<regexp name="boolean" value="(true|false)" />
<regexp name="singlePrintable" value="[a-zA-Z0-9]{1}" /> <!-- \w allows the '_' character -->
Expand Down Expand Up @@ -77,7 +77,7 @@
<!-- This is for resources referenced from CSS (such as background images and other imported stylesheets) -->
<regexp name="cssOnsiteUri" value="url\(([\p{L}\p{N}\\/\.\?=\#&amp;;\-_~]+|\#(\w)+)\)" />
<regexp name="cssOffsiteUri"
value="url\((\s)*((ht|f)tp(s?)://)[\p{L}\p{N}]+[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;;:,\?=/\+!]*(\s)*\)" />
value="url\(\s*+(?:https?|ftps?)://[\p{L}\p{N}]++[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;:,\?=/\+!]*+\s*+\)" />

<!-- This if for CSS Identifiers -->
<regexp name="cssIdentifier" value="[a-zA-Z0-9\-_]+" />
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/antisamy-myspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<regexp name="onsiteURL"
value="^(?!//)(?![\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*(&amp;colon))[\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*" />
<regexp name="offsiteURL"
value="(\s)*((ht|f)tp(s?)://|mailto:)[\p{L}\p{N}]+[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;;:\-_~,\?=/!\(\)]*(\s)*" />
value="\s*+(?:(?:https?|ftps?)://|mailto:)[\p{L}\p{N}]++[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;:,\-_~,\?=/!\(\)]*+\s*+" />

<regexp name="boolean" value="(true|false)" />
<regexp name="singlePrintable" value="[a-zA-Z0-9]{1}" /> <!-- \w allows the '_' character -->
Expand Down Expand Up @@ -79,7 +79,7 @@
<!-- This is for resources referenced from CSS (such as background images and other imported stylesheets) -->
<regexp name="cssOnsiteUri" value="url\(([\p{L}\p{N}\\/\.\?=\#&amp;;\-_~]+|\#(\w)+)\)" />
<regexp name="cssOffsiteUri"
value="url\((\s)*((ht|f)tp(s?)://)[\p{L}\p{N}]+[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;;:,\?=/\+!]*(\s)*\)" />
value="url\(\s*+(?:https?|ftps?)://[\p{L}\p{N}]++[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;:,\?=/\+!]*+\s*+\)" />

<!-- This if for CSS Identifiers -->
<regexp name="cssIdentifier" value="[a-zA-Z0-9\-_]+" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/antisamy-slashdot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<regexp name="onsiteURL"
value="^(?!//)(?![\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*(&amp;colon))[\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*" />
<regexp name="offsiteURL"
value="(\s)*((ht|f)tp(s?)://|mailto:)[\p{L}\p{N}]+[~\p{L}\p{N}\p{Zs}\-_\.@\#\$%&amp;;:,\?=/\+!\(\)]*(\s)*" />
value="\s*+(?:(?:https?|ftps?)://|mailto:)[\p{L}\p{N}]++[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;:,\-_~,\?=/!\(\)]*+\s*+" />

</common-regexps>

Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/antisamy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
value="^(?!//)(?![\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*(&amp;colon))[\p{L}\p{N}\\\.\#@\$%\+&amp;;\-_~,\?=/!]*" />
<regexp name="anchoredURL" value="#(\w)+" />
<regexp name="offsiteURL"
value="(\s)*((ht|f)tp(s?)://|mailto:)[\p{L}\p{N}]+[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;;:\-_~,\?=/!\(\)]*(\s)*" />
value="\s*+(?:(?:https?|ftps?)://|mailto:)[\p{L}\p{N}]++[\p{L}\p{N}\p{Zs}\.\#@\$%\+&amp;:,\-_~,\?=/!\(\)]*+\s*+" />

<regexp name="boolean" value="(true|false)" />
<regexp name="singlePrintable" value="[a-zA-Z0-9]{1}" /> <!-- \w allows the '_' character -->
Expand Down Expand Up @@ -83,7 +83,7 @@
<!-- This is for resources referenced from CSS (such as background images and other imported stylesheets) -->
<regexp name="cssOnsiteUri" value="url\(([\p{L}\p{N}\\/\.\?=\#&amp;;\-_~]+|\#(\w)+)\)" />
<regexp name="cssOffsiteUri"
value="url\((\s)*((ht|f)tp(s?)://)[\p{L}\p{N}]+[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;;:,\?=/\+!]*(\s)*\)" />
value="url\(\s*+(?:https?|ftps?)://[\p{L}\p{N}]++[~\p{L}\p{N}\p{Zs}\-_\.@#$%&amp;:,\?=/\+!]*+\s*+\)" />

<!-- This if for CSS Identifiers -->
<regexp name="cssIdentifier" value="[a-zA-Z0-9\-_]+" />
Expand All @@ -110,8 +110,7 @@
value="rgb\(([1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]),([1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]),([1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\)" />

<!-- Relative color values between 0%-100% are also allowed -->
<regexp name="rgbPercentage"
value="rgb\(([0-9][0-9]?|100)\.?\d*%,([0-9][0-9]?|100)\.?\d*%,([0-9][0-9]?|100)\.?\d*%\)" />
<regexp name="rgbPercentage" value="rgb\(([0-9][0-9]?|100)\.?\d*%,([0-9][0-9]?|100)\.?\d*%,([0-9][0-9]?|100)\.?\d*%\)" />

<!-- CSS2 Allowed System Color Values -->
<regexp name="systemColor"
Expand Down
Loading
Loading