WordPress.org

Making WordPress.org

Changeset 2207


Ignore:
Timestamp:
12/18/2015 06:17:49 PM (6 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Fix display of @link/@see when used in parameter descriptions.

The link markup (as not-so-helpfully added by the parser) gets encoded before being seen by DevHub_Formatting::make_doclink_clickable(), causing it to bypass that function's detection and removal of the markup.

See https://developer.wordpress.org/reference/classes/wpdb/prepare/ for an example where parameters use @link.

File:
1 edited

Legend:

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

    r2206 r2207  
    9595
    9696                $link = $matches[1];
     97
     98                // We may have encoded a link, so unencode if so.
     99                // (This would never occur natually.)
     100                if ( 0 === strpos( $link, '<a ' ) ) {
     101                    $link = html_entity_decode( $link );
     102                }
    97103
    98104                // Undo links made clickable during initial parsing
Note: See TracChangeset for help on using the changeset viewer.