Changeset 26094
- Timestamp:
- 11/11/2013 09:53:08 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r26052 r26094 1171 1171 function balanceTags( $text, $force = false ) { 1172 1172 if ( $force || get_option('use_balanceTags') == 1 ) { 1173 $balance_tags_delimiters = apply_filters( 'balance_tags_delimiters', array( '<!--more.*?-->', '<!--nextpage-->' ) ); 1173 $balance_tags_delimiters = apply_filters( 'balance_tags_delimiters', array( '<!--more.*?-->', '<!--nextpage-->' ) ); 1174 1174 // Capture lets PREG_SPLIT_DELIM_CAPTURE return the delimiters 1175 1175 $delimiters_regex = '/(' . implode( '|', $balance_tags_delimiters ) . ')/'; … … 1610 1610 foreach ( $textarr as $piece ) { 1611 1611 1612 if ( preg_match( '|^<code[\s>]| ', $piece ) || preg_match( '|^<pre[\s>]|', $piece ) )1612 if ( preg_match( '|^<code[\s>]|i', $piece ) || preg_match( '|^<pre[\s>]|i', $piece ) ) 1613 1613 $nested_code_pre++; 1614 elseif ( ( '</code>' === $piece || '</pre>' === $piece) && $nested_code_pre )1614 elseif ( ( '</code>' === strtolower( $piece ) || '</pre>' === strtolower( $piece ) ) && $nested_code_pre ) 1615 1615 $nested_code_pre--; 1616 1616 -
trunk/tests/phpunit/tests/formatting/MakeClickable.php
r26052 r26094 302 302 'URL before pre http://wordpress.org<pre>http://wordpress.org</pre>', 303 303 'URL before code http://wordpress.org<code>http://wordpress.org</code>', 304 'URL after pre < pre>http://wordpress.org</pre>http://wordpress.org',304 'URL after pre <PRE>http://wordpress.org</PRE>http://wordpress.org', 305 305 'URL after code <code>http://wordpress.org</code>http://wordpress.org', 306 306 'URL before and after pre http://wordpress.org<pre>http://wordpress.org</pre>http://wordpress.org', … … 318 318 'URL before pre <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><pre>http://wordpress.org</pre>', 319 319 'URL before code <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><code>http://wordpress.org</code>', 320 'URL after pre < pre>http://wordpress.org</pre><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',320 'URL after pre <PRE>http://wordpress.org</PRE><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>', 321 321 'URL after code <code>http://wordpress.org</code><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>', 322 322 'URL before and after pre <a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a><pre>http://wordpress.org</pre><a href="http://wordpress.org" rel="nofollow">http://wordpress.org</a>',
Note: See TracChangeset
for help on using the changeset viewer.