aws-ses-template-manager icon indicating copy to clipboard operation
aws-ses-template-manager copied to clipboard

Added support for Unicode characters

Open designly1 opened this issue 1 year ago • 2 comments

Fixed a bug in front-end JavaScript where escaped Unicode characters were not being unescaped JSON.parse as a hack. Included most JSON escape characters in function but have not fully tested. It works with HTML and any character I can type on my keyboard. Also works with Unicode emojis.

designly1 avatar Jul 23 '23 20:07 designly1

Thanks @designly1 for bringing this one up. It does seem that AWS returns from the getTemplate unicode chars which I imagine wouldn't be too helpful for the end user when editing a template. I confirmed the unicode issue by saving a new template with emojis (displays as expected in codemirror) but then later when editing we just get our unicode chars displayed.

I'm actually just wondering if we can use decodeURIComponent() for our syntax/subject/text etc. Some quick and brief testing on my end shows it could be a possible solution. Whilst your regex I would have no doubt it would work, this may be a much simpler one liner solution to solve the issue 🤞. Currently investigating.

MattRuddick avatar Aug 02 '23 18:08 MattRuddick

Fixed a bug in front-end JavaScript where escaped Unicode characters were not being unescaped JSON.parse as a hack. Included most JSON escape characters in function but have not fully tested. It works with HTML and any character I can type on my keyboard. Also works with Unicode emojis.

This patch works well in my case. Since I have to frequently update my template (with lots of emoji), it really enhances my efficiency.

BertramRay avatar Dec 14 '23 09:12 BertramRay