prismicio / javascript-kit

Development kit for the Javascript language
https://developers.prismic.io
106 stars 69 forks source link

Preformatted Text with HTML entities #66

Closed zwigby closed 10 years ago

zwigby commented 10 years ago

This is more of a question on functionality. Should preformatted text automatically convert html entities to code equivalents?

Basically something like? http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/

erwan commented 10 years ago

Hi,

Currently all HTML code in text should be converted to html entities, including pre tags. This is a recent change, starting at version 1.0.18.

If you want to change the behavior, you can do it by providing an html serializer to the toHtml method.