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

Fix escaping in post summary #382

Merged
merged 1 commit into from Oct 13, 2020
Merged

Conversation

@Antolius
Copy link
Contributor

@Antolius Antolius commented Sep 5, 2020

Unescaping post content after sanitizing it. This will prevent double
escaping when summary is rendered by html/template package which does
escaping by default.
Fixes #340


  • I have signed the CLA
Unescaping post content after sanitizing it. This will prevent double
escaping when summary is rendered by html/template package which does
escaping by default.
Fixes #340
@Antolius
Copy link
Contributor Author

@Antolius Antolius commented Sep 5, 2020

The double encoding issue could also be fixed by updating templates to use the SummaryHTML method here and here.

I opted to unescape Content in the Summary method because Title is already treated that way so this seemed more in line with the existing code. If you'd prefer updates to the templates instead, I can switch it up.

@thebaer thebaer added this to the 0.13 milestone Oct 13, 2020
Copy link
Member

@thebaer thebaer left a comment

Thanks for addressing this, @Antolius! I think the route you chose for this solution was the right one. Merging now!

@thebaer thebaer merged commit bb008aa into writeas:develop Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.