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

Replaces "{ }" with escaped braces "{{ }}" fix for json format string error #212

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

carderm
Copy link

@carderm carderm commented Nov 9, 2020

A json field with curly braces can cause an error inside the django function 'format_html' with 'key error'. This resolves that.

@farridav
Copy link
Owner

farridav commented Nov 9, 2020

I'd like to be able to test this, also perhaps the problem goes away if we change format_html to mark_safe ..

@carderm
Copy link
Author

carderm commented Nov 9, 2020

I'd like to be able to test this, also perhaps the problem goes away if we change format_html to mark_safe ..

It seems to work with mark_safe - might be a cleaner solution. I'll commit that.

@TysonRV TysonRV self-requested a review November 9, 2020 09:23
@TysonRV
Copy link
Contributor

TysonRV commented Nov 9, 2020

@carderm Looking good! Thanks for contributing 🙂

@TysonRV TysonRV merged commit 712d58d into farridav:master Nov 9, 2020
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

Successfully merging this pull request may close these issues.

3 participants