[wp-trac] [WordPress Trac] #43946: Inconsistent encoding of comment_content

WordPress Trac noreply at wordpress.org
Thu May 3 13:20:05 UTC 2018


#43946: Inconsistent encoding of comment_content
--------------------------+------------------------------
 Reporter:  leewillis77   |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Comments      |     Version:  4.9.5
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by leewillis77):

 Thanks for the reproduction, and the proposed patch. However, I'm not sure
 that patch really addresses the issue. In general, best practice is to
 store content "raw" and escape it as appropriate on usage (bearing in mind
 that different output schemes will have different encoding needs, e.g. XML
 vs HTML vs JSON, so ideally any such patch should do that (ensuring that
 it *is* properly escaped on usage).

 I also think any patch needs to deal somehow with legacy data.

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


More information about the wp-trac mailing list