fixed escape sequences
This commit is contained in:
		
							parent
							
								
									066bdc0713
								
							
						
					
					
						commit
						20b227c5b2
					
				| 
						 | 
				
			
			@ -117,7 +117,7 @@ function parseMessageString($MessageString) {
 | 
			
		|||
 * the appropriate HTML tages <b> and </b> 
 | 
			
		||||
 */
 | 
			
		||||
function boldText($text) {
 | 
			
		||||
	$pattern = "/\{bold\}([^{]*)\{endbold\}/"; // Regular expression matching {bold}[Text]{endbold}
 | 
			
		||||
	$pattern = "/\\{bold\\}([^{]*)\\{endbold\\}/"; // Regular expression matching {bold}[Text]{endbold}
 | 
			
		||||
	$replace = "<b class=\"status\">\\1</b>"; // Replace pattern
 | 
			
		||||
	return preg_replace($pattern,$replace,$text);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ function boldText($text) {
 | 
			
		|||
 * @return string Input string with HTML-formatted color tags
 | 
			
		||||
 */
 | 
			
		||||
function colorText($text) {
 | 
			
		||||
	$pattern = "/\{color=#?([0-9,a-f,A-F]{6})\}([^{]*)\{endcolor\}/"; // Regular expression matching {color=#[HEX-Value]}[Text]{endcolor} or {color=[HEX-Value]}[Text]{endcolor}
 | 
			
		||||
	$pattern = "/\\{color=#?([0-9,a-f,A-F]{6})\\}([^{]*)\\{endcolor\\}/"; // Regular expression matching {color=#[HEX-Value]}[Text]{endcolor} or {color=[HEX-Value]}[Text]{endcolor}
 | 
			
		||||
	$replace = "<font color=\"#\\1\">\\2</font>"; // Replace pattern
 | 
			
		||||
	return preg_replace($pattern,$replace,$text);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -147,7 +147,7 @@ function colorText($text) {
 | 
			
		|||
 * @return string Input string with HTML-formatted link tags
 | 
			
		||||
 */
 | 
			
		||||
function linkText($text) {
 | 
			
		||||
	$pattern = "/\{link=([^}]*)\}([^{]*)\{endlink\}/"; // Regular expression matching {link=[Link-Target]}[Text]{endlink}
 | 
			
		||||
	$pattern = "/\\{link=([^}]*)\\}([^{]*)\\{endlink\\}/"; // Regular expression matching {link=[Link-Target]}[Text]{endlink}
 | 
			
		||||
	$replace = "<a href=\"\\1\" target=\"_blank\">\\2</a>"; //Replace pattern
 | 
			
		||||
	return preg_replace($pattern,$replace,$text);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,8 +57,8 @@ setlanguage();
 | 
			
		|||
 | 
			
		||||
//load account
 | 
			
		||||
if (isset($_GET['DN'])) {
 | 
			
		||||
	$DN = str_replace("\'", '', $_GET['DN']);
 | 
			
		||||
	$type = str_replace("\'", '', $_GET['type']);
 | 
			
		||||
	$DN = str_replace("\\'", '', $_GET['DN']);
 | 
			
		||||
	$type = str_replace("\\'", '', $_GET['type']);
 | 
			
		||||
	if ($_GET['type'] == $type) $type = str_replace("'", '',$_GET['type']);
 | 
			
		||||
	if ($_GET['DN'] == $DN) $DN = str_replace("'", '',$_GET['DN']);
 | 
			
		||||
	$_SESSION['account'] = new accountContainer($type, 'account');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -116,7 +116,7 @@ if ($_POST['submit']) {
 | 
			
		|||
	if ($_POST['logDestination'] == "none") $cfg->logDestination = "NONE";
 | 
			
		||||
	elseif ($_POST['logDestination'] == "syslog") $cfg->logDestination = "SYSLOG";
 | 
			
		||||
	else {
 | 
			
		||||
		if (isset($_POST['logFile']) && ($_POST['logFile'] != "") && eregi("^[a-z0-9/\\\:\\._-]+$", $_POST['logFile'])) {
 | 
			
		||||
		if (isset($_POST['logFile']) && ($_POST['logFile'] != "") && eregi("^[a-z0-9/\\\\:\\._-]+$", $_POST['logFile'])) {
 | 
			
		||||
			$cfg->logDestination = $_POST['logFile'];
 | 
			
		||||
		}
 | 
			
		||||
		else $errors[] = _("The log file is empty or contains invalid characters! Valid characters are: a-z, A-Z, 0-9, /, \\, ., :, _ and -.");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue