Skip to content

Commit

Permalink
#961 Standarizes apostrophe encoding.
Browse files Browse the repository at this point in the history
Standarizes and encodes multiple instances and charcodes of apostrophe
for better encoding.
  • Loading branch information
amostajo authored and michaeltorbert committed Jul 16, 2017
1 parent 48dd955 commit 23ad8a0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions aioseop_class.php
Expand Up @@ -4912,7 +4912,7 @@ private function html_entity_decode( $value ) {
array(
'/\“|\”|&#[xX]00022;|"|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
.'|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;/', // Double quotes
'/'/', // Apostrophes
'/–|'/', // Apostrophes
),
array(
'"', // Double quotes
Expand All @@ -4927,6 +4927,7 @@ private function html_entity_decode( $value ) {
* Returns SEO ready string with encoded HTML entitites.
*
* @since 2.3.14
* @since 2.3.14.1 Hot fix on apostrophes.
*
* @param string $value Value to encode.
*
Expand All @@ -4936,13 +4937,13 @@ private function seo_entity_encode( $value ) {
return preg_replace(
array(
'/\"|\“|\”|\„/', // Double quotes
'/\'/', // Apostrophes
'/\'|\’/', // Apostrophes
),
array(
'"', // Double quotes
''', // Apostrophes
''', // Apostrophes
),
$value
esc_html( $value )
);
}

Expand Down

0 comments on commit 23ad8a0

Please sign in to comment.