Is there a javascript escape function for phrases?

Luciano

Member
[EDIT] oops :oops: sorry, wanted to post in Development Questions Could you please Move It ( if I delete it it seems the title remains[/Edit]

Hi, is there a special function to escape javascript phrases? (specially translated phrases)

I mean when you assign xenforo phrases to javascript variables in templates,
there used to be a function escape_js($phrase) to handle quotes or special utf-8 characters.

My question is, is there something similar in xenforo?

Luc
 
Try the jsescape function:
Code:
{xen:jsescape {xen:phrase your_phrase_title}}

You can see more examples in the "editor_js_setup" template.
 
Try the jsescape function:
Code:
{xen:jsescape {xen:phrase your_phrase_title}}

You can see more examples in the "editor_js_setup" template.
awesome find :) Thanks for posting the answer. Updating a COS forum now using that tip.
 
Top Bottom