[TYPO3-core] RFC #8591: Umlauts get broken in shortcut menu while renaming the shortcut
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Sun Jun 8 21:20:05 CEST 2008
Tobias Liebig schrieb:
>
> + // get charset from current ajax request (which is expected to be utf-8)
> + preg_match('/.*; charset=(.*)$/i', strtolower($_SERVER["CONTENT_TYPE"]), $contenttype);
You don't need strtolower if you use the i modifier.
The content type should be safe (because set by some friendly code), but
your regexp matches ALL after the = (incl. any white space and further
header content).
Maybe you can use this $GLOBALS['LANG']->csConvObj->parse_charset() if
you expect variant spellings of the charsets. It will do the trimming
and case lowering as well.
Masi
More information about the TYPO3-team-core
mailing list