Skip to content

Commit

Permalink
FIX Multi HTML entities in image shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed Aug 7, 2023
1 parent 1730623 commit 57c6adf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Shortcodes/ImageShortcodeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static function regenerate_shortcode($args, $content, $parser, $shortcode
// Rebuild shortcode
$parts = [];
foreach ($args as $name => $value) {
$htmlValue = Convert::raw2att($value);
$htmlValue = htmlspecialchars($value ?? '', ENT_QUOTES, 'UTF-8', false);
$parts[] = sprintf('%s="%s"', $name, $htmlValue);
}
return sprintf("[%s %s]", $shortcode, implode(' ', $parts));
Expand Down

0 comments on commit 57c6adf

Please sign in to comment.