Skip to content
Snippets Groups Projects
Commit 1b06d47e authored by Ludwig Rafelsberger's avatar Ludwig Rafelsberger Committed by Markus Klein
Browse files

[BUGFIX] Properly match html tags with data-* attributes

The cropHTML method needs to account for html tags - therefore it must
match them. The regex used for matching tags misses html tags with
attributes that contain dashes. (\w matches "any 'word' character",
being "[…] any letter or digit or the underscore character […]") [1].

The current W3C html draft sets even less constraints on what makes an
attribute name [2], but including dashes looks like the most urgent
need.

[1] http://php.net/manual/en/regexp.reference.escape.php
[2] http://www.w3.org/TR/html51/syntax.html#attributes-0

Resolves: #63086
Releases: master, 6.2
Change-Id: I52832ca3e8d9660faa939e673af6cdc32f310b18
Reviewed-on: http://review.typo3.org/34371


Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarHelmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
parent 0829498d
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment