mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-20 11:14:28 +00:00
Use less greedy regex in wptexturize(). Adds unit tests.
Props miqrogroove. See #28564. git-svn-id: https://develop.svn.wordpress.org/trunk@28852 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1305,6 +1305,22 @@ class Tests_Formatting_WPTexturize extends WP_UnitTestCase {
|
||||
'word <img src="http://example.com/wp-content/uploads/2014/06/image-300x216.gif" /> word', // Ensure we are not corrupting image URLs.
|
||||
'word <img src="http://example.com/wp-content/uploads/2014/06/image-300x216.gif" /> word',
|
||||
),
|
||||
array(
|
||||
'[ do texturize "[quote]" here ]',
|
||||
'[ do texturize “[quote]” here ]',
|
||||
),
|
||||
array(
|
||||
'[ regex catches this <a href="[quote]">here</a> ]',
|
||||
'[ regex catches this <a href="[quote]">here</a> ]',
|
||||
),
|
||||
array(
|
||||
'[ but also catches the <b>styled "[quote]" here</b> ]',
|
||||
'[ but also catches the <b>styled “[quote]” here</b> ]',
|
||||
),
|
||||
array(
|
||||
'[Let\'s get crazy<input>[plugin code="<a href=\'?a[]=100\'>hello</a>"]</input>world]',
|
||||
'[Let’s get crazy<input>[plugin code="<a href=\'?a[]=100\'>hello</a>"]</input>world]',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user