Update regex

This commit is contained in:
Mike Jolley 2018-02-20 15:56:33 +00:00
parent 0cda2dba82
commit 7a68cb9c12
1 changed files with 19 additions and 21 deletions

View File

@ -133,26 +133,25 @@ class WC_Email extends WC_Settings_API {
* @see $plain_replace * @see $plain_replace
*/ */
public $plain_search = array( public $plain_search = array(
"/\r/", // Non-legal carriage return "/\r/", // Non-legal carriage return
'/&(nbsp|#160);/i', // Non-breaking space '/&(nbsp|#0*160);/i', // Non-breaking space
'/&(quot|rdquo|ldquo|#8220|#8221|#147|#148);/i', // Double quotes '/&(quot|rdquo|ldquo|#0*8220|#0*8221|#0*147|#0*148);/i', // Double quotes
'/&(apos|rsquo|lsquo|#8216|#8217);/i', // Single quotes '/&(apos|rsquo|lsquo|#0*8216|#0*8217);/i', // Single quotes
'/>/i', // Greater-than '/>/i', // Greater-than
'/</i', // Less-than '/</i', // Less-than
'/&/i', // Ampersand '/&#0*38;/i', // Ampersand
'/&/i', // Ampersand '/&/i', // Ampersand
'/&/i', // Ampersand '/&(copy|#0*169);/i', // Copyright
'/&(copy|#169);/i', // Copyright '/&(trade|#0*8482|#0*153);/i', // Trademark
'/&(trade|#8482|#153);/i', // Trademark '/&(reg|#0*174);/i', // Registered
'/&(reg|#174);/i', // Registered '/&(mdash|#0*151|#0*8212);/i', // mdash
'/&(mdash|#151|#8212);/i', // mdash '/&(ndash|minus|#0*8211|#0*8722);/i', // ndash
'/&(ndash|minus|#8211|#8722);/i', // ndash '/&(bull|#0*149|#0*8226);/i', // Bullet
'/&(bull|#149|#8226);/i', // Bullet '/&(pound|#0*163);/i', // Pound sign
'/&(pound|#163);/i', // Pound sign '/&(euro|#0*8364);/i', // Euro sign
'/&(euro|#8364);/i', // Euro sign '/&(dollar|#0*36);/i', // Dollar sign
'/&(dollar|#36|#036|#x00024);/i', // Dollar sign '/&[^&\s;]+;/i', // Unknown/unhandled entities
'/&[^&\s;]+;/i', // Unknown/unhandled entities '/[ ]{2,}/', // Runs of spaces, post-handling
'/[ ]{2,}/', // Runs of spaces, post-handling
); );
/** /**
@ -169,7 +168,6 @@ class WC_Email extends WC_Settings_API {
'<', // Less-than '<', // Less-than
'&', // Ampersand '&', // Ampersand
'&', // Ampersand '&', // Ampersand
'&', // Ampersand
'(c)', // Copyright '(c)', // Copyright
'(tm)', // Trademark '(tm)', // Trademark
'(R)', // Registered '(R)', // Registered