[wp-trac] [WordPress Trac] #29658: Curly quotes injected into short code attributes when special characters present

WordPress Trac noreply at wordpress.org
Sat Sep 13 19:03:02 UTC 2014


#29658: Curly quotes injected into short code attributes when special characters
present
--------------------------+------------------------------
 Reporter:  msimpson      |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  4.0
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by msimpson):

 Replying to [comment:6 miqrogroove]:
 > > Toggle back to Text mode. You see that the special characters have
 been changed to their html-entity codes.
 >
 > I'm fairly certain this is how it always works.  Did you see a change
 from a previous version?  And if so, what is the exact difference?

 HTML entity codes is not the issue. The issue is the injection of quotes
 into the attribute string value and incorrect parsing of the attributes in
 the case I demonstrated my additional comment.

 It has always been true (past few years AFAIK) that if you put special
 characters in a short code attribute then you get the exact characters if
 you entered the short code in the editor's Text mode but HTML-entity
 versions of them if you entered the short code in Visual mode. As a plugin
 writer, I have accounted for that years ago.

 What's different now, is if you put special characters in a short code
 attribute in Text mode, WP now inject quotes into the attribute strings.
 And, as in the case I describe above, WP can process the attributes wrong
 (case with the space above).

 Within the past week or so, some users of my short code complained the
 short codes no longer work. Given that, my best guess it that the quoting
 bug was introduced in WP 4.0 and users started seeing the issue once they
 upgrade.

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


More information about the wp-trac mailing list