#12118 closed defect (bug) (fixed)
wp_texturize converting x to × is too greedy
| Reported by: | mtdewvirus | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Formatting | Version: | 3.0 |
| Severity: | normal | Keywords: | needs-unit-tests |
| Cc: | Focuses: |
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
@
16 years ago
- Resolution → fixed
- Status new → closed
Since there's a fix in, it seems this ticket never got closed. So closing.
#4
@
9 years ago
https://core.trac.wordpress.org/changeset/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 https://core.trac.wordpress.org/ticket/4116 sufficient?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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: