admin管理员组文章数量:1291027
I have imported HTML into a Wordpress page, it contains some HTML as follows:
<a class="fancybox" href="bigger-image-path.jpg" title="<em>This is the image caption,</em> by someone">
<picture>
<source media="(min-width: 768px)" srcset="/image-path.jpg 1x, /image-path.jpg 2x"/>
<img class="image-no-border" style="width:100%; height:auto" src="/image-path.jpg" alt="alt">
</picture>
</a>
When I look at this HTML once it is imported via phpmyadmin, the HTML all looks correct as it is above.
But when I look at the page source, the HTML has been changed somehow to the following:
<a class="fancybox" href="bigger-image-path.jpg" title="<em>This is the image caption,</em> by someone”>
<picture>
<source media=" (min-width:="" 768px)"="" srcset="/image-path.jpg 1x, /image-path.jpg 2x" data-category="Open-popup" data-message="popupContent_bigger-image-path.jpg" data-type="popupType_hiddenDiv" data-fancybox-ready="true">
<img class="image-no-border" style="width:100%; height:auto" src="/image-path.jpg" alt="alt">
Please note the curly quotes after the 'by someone' in the title="" attribute in the opening tag.
After testing this only happens when the title="" in that opening contains html tags, like the tags it is currently containing.
This example isn't a one off, we have many examples of using html in the title="" tags of fancybox tags, so I would like to understand why/how/where wordpress is making this change and a possible solution to stop it happening.
版权声明:本文标题:html - Why is Wordpress swapping double quotes (") to curly quotes (“) and how do I stop it from happening? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741501967a2382101.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论