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 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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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

glide.rest.sanitize_request_input
to false

@odinsride
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants