WordPress.org

Making WordPress.org

Changeset 8466


Ignore:
Timestamp:
03/15/2019 04:09:12 PM (3 years ago)
Author:
coffee2code
Message:

Developer: Fix parser's conversion of double underscores to strong text in parameter descriptions.

The parser interprets __ as either as an opening or closing <strong>, which is never intended. This was already addressed for params via get_params(), but more broadly to affect other aspects of the param not just description. However, format_param_description() is used in other similar contexts, so this fix is needed there.

See #2900.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

    r8233 r8466  
    278278        // In pretty much all cases, the docs mean literal '*' and never emphasis.
    279279        $text = str_replace( array( '<em>', '</em>' ), '*', $text );
     280
     281        // Undo parser's Markdown conversion of '__' to `<strong>` and `</strong>`.
     282        $text = str_replace( array( '<strong>', '</strong>' ), '__', $text );
    280283
    281284        // Encode all htmlentities (but don't double-encode).
Note: See TracChangeset for help on using the changeset viewer.