[wp-trac] [WordPress Trac] #47328: Apostrophe use in WordPress posts and pages with escaping issues

WordPress Trac noreply at wordpress.org
Mon May 20 15:17:32 UTC 2019


#47328: Apostrophe use in WordPress posts and pages with escaping issues
-------------------------------------------------+-------------------------
 Reporter:  eagleangel                           |      Owner:  (none)
     Type:  defect (bug)                         |     Status:  new
 Priority:  normal                               |  Milestone:  Awaiting
                                                 |  Review
Component:  General                              |    Version:  5.2
 Severity:  blocker                              |   Keywords:
  Focuses:  ui, administration, coding-          |
  standards                                      |
-------------------------------------------------+-------------------------
 I raised a ticket with Yoast at https://github.com/Yoast/wordpress-
 seo/issues/12970 due to an issue I thought was with the Yoast SEO plugin,
 yet it turns out it is a flaw in the WordPress software coding.

 If you have a word or phrase wrapped with apostrophes for single quote
 marks, or you have two or more words with apostrophes in the same
 paragraph, you can have issues where the apostrophes are not escaped in
 the output for PHP and JavaScript purposes.  Because (I am assuming)
 Gutenberg is supposed to help those who know little to no HTML, I feel
 this is a serious flaw to a degree.

 Whilst semantically it is incorrect to do so, most people do use
 apostrophes as single quote marks due to the fact that the correct
 character is not available on a standard computer keyboard.  Those who do
 know about [https://dev.w3.org/html5/html-author/charref HTML entities]
 can overcome this issue, but can we please have WordPress software correct
 the HTML output with {{{'}}} when the apostrophe is typed?

 Thinking about the issue, maybe double quotation marks should also be
 substituted with {{{"}}}.

 The only issue I can see with this is that a forewarning would need to go
 out to plugin and theme developers such as WooCommerce before the changes
 are implemented as it may affect the way data is saved, retrieved and
 outputted within their plugins etc.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47328>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list