Skip to content
Snippets Groups Projects
Commit e19e8efd authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2541094 by dawehner: Get rid of strtr in Html::getId()

parent d4679838
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ public static function getUniqueId($id) {
* @see self::getUniqueId()
*/
public static function getId($id) {
$id = strtr(Unicode::strtolower($id), array(' ' => '-', '_' => '-', '[' => '-', ']' => ''));
$id = str_replace([' ', '_', '[', ']'], ['-', '-', '-', ''], Unicode::strtolower($id));
// As defined in http://www.w3.org/TR/html4/types.html#type-name, HTML IDs can
// only contain letters, digits ([0-9]), hyphens ("-"), underscores ("_"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment