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

In Widget HTML Template, <script> tag doesn't sync properly #24

Closed
odinsride opened this issue Aug 19, 2019 · 6 comments
Closed

In Widget HTML Template, <script> tag doesn't sync properly #24

odinsride opened this issue Aug 19, 2019 · 6 comments

Comments

@odinsride
Copy link
Contributor

@odinsride odinsride commented Aug 19, 2019

I have the following line in my HTML template:

<script type="text/ng-template" id="myModal">

When saving from VS Code, the attributes of the script tag are lost and the < and > characters sync to the instance with escape codes:

&lt;script&gt;

and

&lt;/script&gt;

PS: I noticed this while working in my PDI which is on the New York release.

@arnoudkooi

This comment has been minimized.

Copy link
Owner

@arnoudkooi arnoudkooi commented Aug 20, 2019

I'll have to look at this, but could this be something the instance does? Does it work when editing in the browser based widget editor?

@andfug

This comment has been minimized.

Copy link

@andfug andfug commented Oct 7, 2019

I am experiencing the same issue with < and > becoming &lt; and &gt; for script-tags.

Example:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
becomes
&lt;script&gt;&lt;/script&gt;

When editing directly in the web editor in my SN instance the script tags remains untouched and works as expected.

@arnoudkooi

This comment has been minimized.

Copy link
Owner

@arnoudkooi arnoudkooi commented Oct 8, 2019

I've looked in to this, you would need to set system property

glide.rest.sanitize_request_input
to false

@odinsride

This comment has been minimized.

Copy link
Contributor Author

@odinsride odinsride commented Oct 10, 2019

Great, thanks @arnoudkooi I will try this later today and let you know if it resolves my issue.

odinsride added a commit to odinsride/sn-scriptsync that referenced this issue Oct 10, 2019
@odinsride

This comment has been minimized.

Copy link
Contributor Author

@odinsride odinsride commented Oct 10, 2019

Confirmed setting the property to false fixes the issue. PR submitted for documentation purposes. Feel free to close this issue at your convenience Arnoud 😄

arnoudkooi added a commit that referenced this issue Oct 10, 2019
Add FAQs section to README and provide Solution to #24
@arnoudkooi

This comment has been minimized.

Copy link
Owner

@arnoudkooi arnoudkooi commented Oct 10, 2019

Thanks, good idea to add a faq!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.