cgross / grunt-dom-munger

Grunt task to read and manipulate HTML with CSS selectors.
MIT License
93 stars 40 forks source link

Escape rails tags #37

Open skitterm opened 8 years ago

skitterm commented 8 years ago

I'm working with a index.html.erb file (rails file), and I need to update the src attribute of a script to be something like this:

<script src="<%= path_to_code %>"></script>

I'm using the update method, but when I do so (by value: ''<%= path_to_code %>"), it doesn't put transfter that string literally to my file. I'm guessing that <%= %> is used in grunt/this library.

How would I escape this so I can pass it as a string?