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

Component error: when using double forward slash in JsCode #132

Closed
DharmeshPandav opened this issue Aug 16, 2022 · 1 comment
Closed

Component error: when using double forward slash in JsCode #132

DharmeshPandav opened this issue Aug 16, 2022 · 1 comment

Comments

@DharmeshPandav
Copy link

DharmeshPandav commented Aug 16, 2022

I have encountered an error when used AgGrid with allow_unsafe_jscode to True and passing cellRenderer for one of the Column

Component Error
`` literal not terminated before end of script

I am constructing a custom anchor tag based on params.value and using https:// there was resulting in error

I have escaped forward slash i.e. https:\/\/ to fix the issue,

return <a href="https://example.com/${params.value}/" target="_blank">${params.value}</a>;
to
return <a href="https:\/\/example.com/${params.value}/" target="_blank">${params.value}</a>;

I was wondering if this can be handled more elegantly in the component itself ? Thanks
used to work in pre version.

(have switched from 0.2.3 where it was working to 0.3.2 so not sure when it was broken in between)

PS: thanks for building an awesome component that works all the time out of the box 💯

@PablocFonseca
Copy link
Owner

Should be fixed in 0.3.3

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

No branches or pull requests

2 participants