aws-ses-template-manager
aws-ses-template-manager copied to clipboard
Added support for Unicode characters
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.
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.
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.