cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartedit - Sanitize of strings

Former Member
0 Likes
568

Hi Experts, there is a ootb sanitizing of Strings in smartedit for the types "ShortString" and "LongString". The sanitizing function looks like:

 return !isBlank(str) ? str.split('').reverse().join('').replace(/(?:(([()])(?!\\)))/g, '$1\\').split('').reverse().join('') : str;


The result is that round parenthesis "()" are escaped with a backslash. The api-comment is "escapes any harmful scripting from a string, leaves innocuous HTML untouched".

There are 2 questions:

  • Which kind of scripting is meant? JS, JSP, ??

  • Does this mean, that you can not add content which contains parenthisis at all within the types "ShortString" and "LongString"?

Cheers, Andreas

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

Hi Experts,

we also have the same problem. Do you have a solution for this?

Best regards,

Ira