[TYPO3-core] RFC: Bug #15311: t3lib_div::sanitizeLocalUrl() leads to fatal error on PHP4 systems
Jigal van Hemert
jigal at xs4all.nl
Mon Aug 2 23:05:27 CEST 2010
Oliver Hader wrote:
> Solution:
> Remove the unicode character classes in the regular expression and
> replace them by regular plain classes. Besides that, the host name will
If I read the code correctly it only wants to check for not alphanumeric
characters plus a few symbols and if it fails the url (part) is replaced
with an empty string.
What if we use t3lib_cs::specCharsToASCII('utf-8', $url) first? This
will convert character to one or more ASCII characters, but they will
remain in the categories we wanted to check; it will not convert symbols
to numbers or letters.
After conversion we can use the low-ascii regexps to validate the url
(parts).
--
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-team-core
mailing list