[wp-trac] [WordPress Trac] #29563: WordPress does not preserve original comment text in database (was: Wordpress does not preserve original comment text in database)

WordPress Trac noreply at wordpress.org
Sat Sep 6 20:25:55 UTC 2014


#29563: WordPress does not preserve original comment text in database
-----------------------------+------------------------------
 Reporter:  AmbushCommander  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Comments         |     Version:  3.9.2
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------------
Changes (by SergeyBiryukov):

 * focuses:  ui =>


Old description:

> Steps to reproduce:
>
> 1. Write a comment which contains some invalid HTML, e.g. `<s>a</s>`
> 2. Submit comment
> 3. View comment in database
>
> Expected results: Comment in database is original, verbatim comment input
> by commentor
>
> Actual result: Comment in database has had HTML stripped out, e.g.
>
> {{{
> mysql> select comment_content from wp_comments where comment_id = 2;
> +-----------------+
> | comment_content |
> +-----------------+
> | a               |
> +-----------------+
> 1 row in set (0.00 sec)
> }}}
>
> This is bad behavior because if a user formats a comment incorrectly,
> Wordpress will silently eat their markup, and an administrator has no way
> of retroactively going and fixing the comment. Wordpress should *always
> always always* keep the original text.

New description:

 Steps to reproduce:

 1. Write a comment which contains some invalid HTML, e.g. `<s>a</s>`
 2. Submit comment
 3. View comment in database

 Expected results: Comment in database is original, verbatim comment input
 by commentor

 Actual result: Comment in database has had HTML stripped out, e.g.

 {{{
 mysql> select comment_content from wp_comments where comment_id = 2;
 +-----------------+
 | comment_content |
 +-----------------+
 | a               |
 +-----------------+
 1 row in set (0.00 sec)
 }}}

 This is bad behavior because if a user formats a comment incorrectly,
 WordPress will silently eat their markup, and an administrator has no way
 of retroactively going and fixing the comment. WordPress should *always
 always always* keep the original text.

--

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


More information about the wp-trac mailing list