#15968 closed defect (bug) (invalid)
Shortcode parser includes quotes in attribute value
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | major | Version: | 3.0.3 |
| Component: | Shortcodes | Keywords: | shortcode, parsing, quotes |
| Focuses: | Cc: |
Description
This appears to be new since 3.0.3. Any shortcodes using the following format:
[shortcode attribute="value"]
when $value is extracted, it now includes the quotes. IE: $value == ""value""; (as opposed to $value == "value").
As a result, any plugins that switch or parse $value without first stripping the quotes will now fail. This could potentially affect a lot of implementations. I can't imagine this is desired functionality.
Change History (7)
#2
@
15 years ago
Can be fixed by changing line 229 of shortcodes.php to this:
$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", htmlspecialchars_decode($text));
#3
@
15 years ago
Can't reproduce on current trunk. Could you try this on a default installation without any custom plugins or themes?
#5
@
15 years ago
Yes, that must be it. I apologize for not trying this on a vanilla install before submitting. I'm new.
For future reference, theme:arras (http://www.arrastheme.com/)
After further inspection the following shortcode:
[shortcode attribute="value"]
yields the following:
$attribute == ""value"";