Skip to content

Commit

Permalink
decode html entities before we check the shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Oct 31, 2022
1 parent 7e12dbc commit 7b2555e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/class-bln-publisher-paywall.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ protected function extract_options_from_shortcode()
// maybe related: https://github.com/WordPress/gutenberg/issues/37754 + https://github.com/elementor/elementor/issues/9340
// replacing potential quotes that I found with normal quotes (`"`) that can be parsed by `shortcode_parse_atts`
// NOTE: this means none of those character can be used in the paywall attributes (button text, description, etc.)

$atts_string = html_entity_decode($atts_string); // some filter might turn the shortcode into html entities
$invalid_quotes = array("", "ˮ", "ʺ", "", "", "˝", "", "", "", "", "`", "´");
foreach($invalid_quotes as $invalid_char) {
// trying to match only the relevant quotes (not the ones that might be used in the text
Expand Down

0 comments on commit 7b2555e

Please sign in to comment.