Skip to content

Commit

Permalink
Merge pull request #1459 from mambax7/feature/fix_textsanitizer_preg_…
Browse files Browse the repository at this point in the history
…replace_for_color_size

Fix for #1458
  • Loading branch information
mambax7 authored Apr 1, 2024
2 parents a31cfb7 + b458fae commit 1cf1825
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/class/module.textsanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ public function &xoopsCodeDecode(&$text, $allowimage = 1)
$replacements[] = '<a href="\\2" rel="external" title="">\\3</a>';
$patterns[] = "/\[url=(['\"]?)([^'\"<>]*)\\1](.*)\[\/url\]/sU";
$replacements[] = '<a href="http://\\2" rel="noopener external" title="">\\3</a>';
$patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9#]*)\\1](.*)\[\/color\]/sU";
$replacements[] = '<span style="color: \\2;">\\3</span>';
$patterns[] = "/\[size=(['\"]?)([a-zA-Z0-9.#]*)\\1](.*)\[\/size\]/sU";
$patterns[] = "/\[color=(['\"]?)([a-zA-Z0-9#]+)\\1?](.*)\[\/color\]/sU";
$replacements[] = '<span style="color: #\\2;">\\3</span>';
$patterns[] = "/\[size=(['\"]?)([a-zA-Z0-9-]+)\\1?](.*)\[\/size\]/sU";
$replacements[] = '<span style="font-size: \\2;">\\3</span>';
$patterns[] = "/\[font=(['\"]?)([^;<>\*\(\)\"']*)\\1](.*)\[\/font\]/sU";
$replacements[] = '<span style="font-family: \\2;">\\3</span>';
Expand Down

0 comments on commit 1cf1825

Please sign in to comment.