[wp-trac] [WordPress Trac] #35216: Return empty string from wp.shortcode.replace() callback is ignored
WordPress Trac
noreply at wordpress.org
Sun Dec 27 22:09:57 UTC 2015
#35216: Return empty string from wp.shortcode.replace() callback is ignored
--------------------------+------------------------------
Reporter: prionkor | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
--------------------------+------------------------------
Changes (by swissspidy):
* keywords: => needs-patch
* focuses: javascript, administration => javascript
Comment:
I'd say the type of `result` should be properly checked instead of doing
something like `return result ? left + result + right : match;`. An empty
string is a legit use case and AFAIK also possible using the PHP
equivalent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35216#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list