Author: rowan.collins
Description:
MagicWord.php contains code for using "$1" in magic word definitions to capture
a variable - as currently used by "$1px", which sets the rescaled width of an
image. However, on investigation this seems to work only by a couple of lucky
coincidences: the regex will not match correctly if there is more than one
synonym, and the part returned is the whole string not the variable part (e.g.
"100px" not "100"; PHP just happens to treat this as "100" if you ask it to turn
it into an integer). After much gnashing of teeth and trial-and-error, I've come
up with an implementation that works as originally intended.
My patch will follow shortly.
Version: 1.4.x
Severity: normal