[TYPO3-core] RFC: bug 284

Wolfgang Klinger wolfgang at stufenlos.net
Fri Feb 24 19:07:53 CET 2006



 *hiya!*

 Type: bugfix

 substUrlsInPlainText does not allow other characters than space and ()
 to terminate URLs in the text.
 BT reference: http://bugs.typo3.org/view.php?id=284
 This patch allows the following characters:
 [whitespace]<>"{|\^[]`(),;'


 bye
 Wolfgang

-------------- next part --------------
--- TYPO3core/t3lib/class.t3lib_div.php	2006-02-24 11:01:07.000000000 +0100
+++ TYPO3core_testing/t3lib/class.t3lib_div.php	2006-02-24 18:57:29.000000000 +0100
@@ -3911,7 +3911,7 @@
 		reset($urlSplit);
 		while(list($c,$v)=each($urlSplit))	{
 			if ($c)	{
-				$newParts = split('[[:space:]]|\)|\(',$v,2);
+                $newParts = preg_split('/\s|[<>"{|\\\^\[\]`(),;\']/', $v, 2);
 				$newURL='http://'.$newParts[0];
 					switch((string)$urlmode)	{
 						case 'all':


More information about the TYPO3-team-core mailing list