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

Compress content inside a script tag with type text/ng-template #7

Closed
leovca opened this issue Oct 28, 2014 · 2 comments
Closed

Compress content inside a script tag with type text/ng-template #7

leovca opened this issue Oct 28, 2014 · 2 comments

Comments

@leovca
Copy link

leovca commented Oct 28, 2014

<script type="text/ng-template" id="ng-table/filters/codigoFilter.html">

<p>
content...
</p>

</script>

the htmlcompressor will only compress it is the type of tag to text/x-jquery-tmpl according to documentation.

"Any content within <pre>, <textarea>, <script> and <style> tags will be preserved and remain untouched (with the exception of <script type="text/x-jquery-tmpl"> tags which are compressed as HTML). Inline javascript inside tags (onclick="test()") will be preserved as well. You can wrap any part of the page in <!-- {{{ -->...<!-- }}} --> comments to preserve it, or provide a set of your own preservation rules (out of the box <?php...?>, <%...%>, and <!--#... --> are also supported)"
@craigburke
Copy link
Owner

I'm not sure I understand.

Right now I put the compressed HTML directly into the $templateCache. I do also account for textarea and pre tag content as well (escaping the newlines within the string I insert).

@craigburke
Copy link
Owner

I'm going to close this one as well. Feel free to comment on your pull request if I didn't explain it well enough. Thanks!

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