Reputation: 6259
In the EXTJS, how to escape special character ?
for example, compiler is complaining showDetail('{1}') , how to escape the '' ?
Thanks
return Ext.String.format(
'{0} <a href="#" onclick="showDetail('{1}');">detail</a>',
value,
record.getReportId()
);
Upvotes: 0
Views: 2968
Reputation: 190986
You should be able to use the standard \
. Place it before '
like so \'
.
return Ext.String.format(
'{0} <a href="#" onclick="showDetail(\'{1}\');">detail</a>',
value,
record.getReportId()
);
Upvotes: 1