Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving HTML within a Craft API attempts to render HTML, which breaks some things. #13

Open
ryanpcmcquen opened this issue Jun 10, 2019 · 5 comments

Comments

@ryanpcmcquen
Copy link

ryanpcmcquen commented Jun 10, 2019

One example is an embedded video, its HTML gets turned into:

<span class=\"fr-video fr-dvb fr-draggable\">Your browser does not support HTML5 video.</span>

Rather than a video tag with a link to the video. Is there a way within the Craft backend to retrieve non-rendered HTML?

@bertoost
Copy link
Contributor

I have to investigate that. Will come back to you a.s.a.p.

@bertoost
Copy link
Contributor

FYI; very busy here. Will investigate tomorrow evening (finally)

@bertoost
Copy link
Contributor

@ryanpcmcquen It's because the HTML Purifier that is applied on save. See Craft's Redactor README for more details (It's copied to Froala) and I will notify this in this repository as well.
You should be able to parse or skip elements to stay in the content, or completely disable the purify setting if you like.
https://github.com/craftcms/redactor#html-purifier-configs

@ryanpcmcquen
Copy link
Author

@bertoost, it was happening even with the purifier disabled.

@bertoost
Copy link
Contributor

bertoost commented Jul 2, 2019

That's strange. I have tested it with the purifier-code commented out. I will re-test a.s.a.p. using the disable feature from the CP.

@bertoost bertoost reopened this Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants