Link to home
Start Free TrialLog in
Avatar of rkoechel
rkoechelFlag for United States of America

asked on

Having trouble escaping variables in javascript

I have the below javascript snippet: #url.typ# and #url.dept# are coldfusion variable on my site.  Some of the variables have an apostrophe in them, ex. men's   Can I escape them inside this snippet somehow?
<script type='text/javascript'>
product.Catalog.init({
    filters: {
        category: ['#url.typ#'],
        department: ['#url.dept#']
    },
    maxFacetOptions: 10
});
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Justin Mathews
Justin Mathews

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial