[Mapbender-commits] r8178 - branches/2.6/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Oct 10 05:52:17 EDT 2011


Author: verenadiewald
Date: 2011-10-10 02:52:17 -0700 (Mon, 10 Oct 2011)
New Revision: 8178

Modified:
   branches/2.6/http/php/mod_layerMetadata.php
Log:
allow curly brackets in <a href...> creation in function display_text

Modified: branches/2.6/http/php/mod_layerMetadata.php
===================================================================
--- branches/2.6/http/php/mod_layerMetadata.php	2011-10-06 14:03:05 UTC (rev 8177)
+++ branches/2.6/http/php/mod_layerMetadata.php	2011-10-10 09:52:17 UTC (rev 8178)
@@ -22,7 +22,7 @@
 $redirectToMetadataUrl = $_GET["redirectToMetadataUrl"];
 
 function display_text($string) {
-    $string = mb_eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
+    $string = mb_eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/{}]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);   
     $string = mb_eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);   
     $string = mb_eregi_replace("\n", "<br>", $string);
     return $string;



More information about the Mapbender_commits mailing list