Bug 1142524
| Summary: | JST filter does not correctly escape backslashes in string literals | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dan Callaghan <dcallagh> |
| Component: | python-webassets | Assignee: | Praveen Kumar <kumarpraveen.nitdgp> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | dcallagh, kumarpraveen.nitdgp, pj.pandit |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-webassets-0.9-4.fc20 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-11-20 23:01:34 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
python-webassets-0.9-4.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/python-webassets-0.9-4.el7 python-webassets-0.9-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-webassets-0.9-4.fc20 python-webassets-0.9-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-webassets-0.9-4.fc19 Package python-webassets-0.9-4.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-webassets-0.9-4.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-14770/python-webassets-0.9-4.fc20 then log in and leave karma (feedback). python-webassets-0.9-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. python-webassets-0.9-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. python-webassets-0.9-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. |
Description of problem: If a template contains a backslash (for example, as part of a regexp on <input pattern=""/> or anywhere else) the backslash is not escaped when the template is converted to a JavaScript string literal by the JST filter. Version-Release number of selected component (if applicable): python-webassets-0.9-1.fc20.noarch How reproducible: not easily, but reliably Steps to Reproduce: 1. Set up a project using webassets JST filter 2. Write a JST template with a backslash, for example: <input pattern="\S+"/> 3. Check the resulting JS file produced by webassets. Actual results: window.JST['mytemplate'] = _.template('<input pattern="\S+"/>'); Expected results: window.JST['mytemplate'] = _.template('<input pattern="\\S+"/>'); Additional info: Upstream PR that was merged for 0.10: https://github.com/miracle2k/webassets/pull/284 The patch applies cleanly to 0.9. https://github.com/danc86/webassets/commit/fad3aded6837751f68b6f3af6851ef19c64dd04c.patch