Skip to content

Commit

Permalink
Update htmlpurifier version to 4.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancramerdesign committed Aug 15, 2019
1 parent d5795c4 commit 0392e9b
Show file tree
Hide file tree
Showing 12 changed files with 747 additions and 506 deletions.
1 change: 1 addition & 0 deletions wire/core/Functions.php
Expand Up @@ -81,6 +81,7 @@ function fuel($name = '') {
* @param string $str String that needs the tabs
* @param int $numTabs Number of tabs to insert per line (note any existing tabs are left as-is, so indentation is retained)
* @param string $str The provided string but with tabs inserted
* @return string
* @deprecated
*
*/
Expand Down
Expand Up @@ -31,7 +31,7 @@ class MarkupHTMLPurifier extends WireData implements Module {
return array(
'title' => 'HTML Purifier',
'summary' => 'Front-end to the HTML Purifier library.',
'version' => 492,
'version' => 495,
'singular' => false,
'autoload' => false,
);
Expand Down Expand Up @@ -114,16 +114,9 @@ class MarkupHTMLPurifier extends WireData implements Module {
*/
public function purify($html) {

// prepare markup for things that HTMLPurifier doesn't support
$hasTel = strpos($html, 'href="tel:') !== false;
if($hasTel) $html = str_replace('href="tel:', 'href="tel//:', $html);

// purify
$html = $this->getPurifier()->purify($html);

// finish markup for things that HTMLPurifier doesn't support
if($hasTel) $html = str_replace('href="tel//:', 'href="tel:', $html);

return $html;
}

Expand Down

0 comments on commit 0392e9b

Please sign in to comment.