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

Properly escape selected facets in search.html #271

Merged
merged 2 commits into from
Aug 20, 2020

Conversation

jeancochrane
Copy link
Contributor

@jeancochrane jeancochrane commented Aug 20, 2020

Overview

This PR udpates search/search.html to properly escape selected facets using json_script.

Connects #270

Notes

This PR only fixes the bug in Councilmatic 2.5. Councilmatic 1.0 will have to be fixed separately.

Testing instructions

@@ -22,7 +22,7 @@
'opencivicdata>=3.1.0',
'pytz>=2015.4',
'django-haystack>=2.8.0,<2.9',
'Django>=2.0,<2.2',
'Django>=2.1,<2.2',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

json_script was introduced in Django 2.1. How badly do we want to support Django 2.0.x? If we do, we can always copy the logic for json_script from the Django source and use that if the installed Django version is less than 2.1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with bumping this to 2.1.x – Metro uses >= 2.2, and they're our power client.

Copy link
Member

@hancush hancush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @jeancochrane!

@@ -22,7 +22,7 @@
'opencivicdata>=3.1.0',
'pytz>=2015.4',
'django-haystack>=2.8.0,<2.9',
'Django>=2.0,<2.2',
'Django>=2.1,<2.2',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with bumping this to 2.1.x – Metro uses >= 2.2, and they're our power client.

@jeancochrane jeancochrane merged commit c584eeb into 2.5 Aug 20, 2020
@jeancochrane jeancochrane deleted the hotfix/jfc/2.5-escape-selected-facets branch August 20, 2020 18:26
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.

2 participants