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 autoload templates to inject data into JS templates properly #5603

Merged
merged 3 commits into from
Dec 24, 2016

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Dec 22, 2016

Previously we relied on Python's str() returning valid JS. Sometimes it actually and very deceptively does.

fixes #5558

@bryevdv
Copy link
Member

bryevdv commented Dec 22, 2016

@mattpap is there a test or demonstration that confirms this fixes #5558 ?

@mattpap
Copy link
Contributor Author

mattpap commented Dec 23, 2016

@bryevdv, the code from #5558 must work in the notebook without errors. As to testing this automatically, it's possible yet annoying, because we would have to test this big blob of text, which is far from robust.

@bryevdv
Copy link
Member

bryevdv commented Dec 24, 2016

Works for me after testing (a screenshot of output here would have saved me the trouble tho)

@bryevdv bryevdv merged commit e4da7e7 into master Dec 24, 2016
@bryevdv bryevdv deleted the mattpap/5558_js_url_format branch December 24, 2016 17:21
azjps pushed a commit to azjps/bokeh that referenced this pull request Dec 28, 2016
…eh#5603)

* Add support for `json` jinja2 filter

* Use json filter to inject data into JS templates

Don't rely on Python's str() being valid JS.

* Add a default value for `force` argument to autoload_js template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unicode __javascript__ external resources breaks output notebook in python 2
2 participants