sitecrafting / conifer

:evergreen_tree: A powerful WordPress library plugin for OO development
https://www.coniferplug.in
MIT License
18 stars 2 forks source link

Button shortcode renders with the wrong encoding #110

Open acobster opened 5 years ago

acobster commented 5 years ago

Expected behavior

As an WP admin, I want to be able to include special characters in my button markup:

[button]<a href="/">button’s apostrophe</a>[/button]

Note about copy/pasting: that's the &#39; entity in "button's apostrophe", an example of a character that get re-encoded incorrectly when saveHTML() gets called.

This should render:

<a href="/" class="btn">button’s apostrophe</a>

Actual behavior

Instead, it renders something like:

<a href="/" class="btn">button&acirc;&#128;&#153;s apostrophe</a>

Steps to reproduce behavior

Put the above shortcode snippet in an RTE

What version of WordPress/PHP/Timber/Conifer are you using?

WP 5.2, Timber 1.8, Conifer 0.6

How did you install Conifer? (for example, via git clone, GitHub zip download, Composer/Packagist?)

GitHub zip download