1. Alexandre Syenchuk
  2. clearbricks

Commits

oli...@edc8846e-aa25-0410-8aa3-9560d1ba59f0  committed ae7a947

You can now add some patterns for html::absoluteURLHandler()

  • Participants
  • Parent commits 5575178
  • Branches default

Comments (0)

Files changed (1)

File common/lib.html.php

View file
 class html
 {
 	public static $url_root;
+	public static $absolute_regs = array();
 	
 	/**
 	@function escapeHTML
 		self::$url_root = $root;
 		$attr = 'action|background|cite|classid|codebase|data|href|longdesc|profile|src|usemap';
 		
-		return preg_replace_callback('/((?:'.$attr.')=")(.*?)(")/msu',array('self','absoluteURLHandler'),$str);
+		$str = preg_replace_callback('/((?:'.$attr.')=")(.*?)(")/msu',array('self','absoluteURLHandler'),$str);
+		
+		foreach (self::$absolute_regs as $r) {
+			$str = preg_replace_callback($r,array('self','absoluteURLHandler'),$str);
+		}
+		
+		return $str;
 	}
 	
 	private static function absoluteURLHandler($m)