#12118 closed defect (bug) (fixed)
wp_texturize converting x to × is too greedy
Reported by: | mtdewvirus | Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Formatting | Keywords: | needs-unit-tests |
Focuses: | Cc: |
Description
Converting x to × in wp_texturize() converts too much. Strings like 4x4 and 4x20=80 should be converted but there are a lot of times when x is in a model number such as rt2x00 where the character should not be converted to a multiplication symbol.
Change History (4)
#3
@
15 years ago
- Resolution set to fixed
- Status changed from new to closed
Since there's a fix in, it seems this ticket never got closed. So closing.
#4
@
7 years ago
[14144] still breaks on urls like http://via.placeholder.com/350x150.jpg or https://upload.wikimedia.org/wikipedia/commons/4/4b/Europa-bei-nacht_1-1024x768.jpg
Should this be re-opened, or is #4116 sufficient?
Note: See
TracTickets for help on using
tickets.
A quick method for this, would be to have the regex matching word boundaries:
/\b(\d+)x(\d+)\b/
and that seems to work as expected:Eg: