[wp-trac] [WordPress Trac] #60948: shortcodes that return with no value / text will break if shortcode is being used as an attribute value

WordPress Trac noreply at wordpress.org
Sat Apr 6 20:38:42 UTC 2024


#60948: shortcodes that return with no value / text will break if shortcode is
being used as an attribute value
--------------------------+------------------------------
 Reporter:  vpelss        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Shortcodes    |     Version:  6.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by vpelss):

 I hope this is clearer in describing what the code is doing.

 Cases:

 Will not replace shortcode

 {{{
 <input type="email" value="[imok_contact_email_1]" title="Please enter a
 valid email address.">
 }}}

 Will replace shortcode if shortcode returns a value. Will mangle html
 output (uses the next attribute name and part of value if any) if
 shortcode returns no value.
 {{{
 <input type="email" value=[imok_contact_email_1] title="Please enter a
 valid email address.">
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60948#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list