[TYPO3-core] RFC: bug 284

Wolfgang Klinger wolfgang at stufenlos.net
Fri Feb 24 19:27:08 CET 2006


 *hiya!*

 On Fri, 24 Feb 2006, Martin Kutschker wrote the following:
> > to terminate URLs in the text.
> > BT reference: http://bugs.typo3.org/view.php?id=284
> > This patch allows the following characters:
> > [whitespace]<>"{|\^[]`(),;'
> 
> ,; are problems. They are legal in URLs, though not likely at the end of a URL.
> 
> Is . missing in the URL terminator list for this reason?

 Really?.. ok,
 a new patch attached.

 Tested and works as expected.


 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 19:20:12.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