ultraq / thymeleafjs

A basic implementation of the Thymeleaf templating engine in JavaScript
Apache License 2.0
52 stars 8 forks source link

It is not possible to escape literal with single quotes #23

Closed rpresb closed 5 years ago

rpresb commented 6 years ago

It is not possible to escape literal with single quotes in th:text

Example:

th:text="'I can''t do this'" or th:text="'I can\'t do this'"

ultraq commented 5 years ago

I've just uploaded a 0.17.2 version which added support for escaping single quotes by using the backslash \ character as that seems to the be the escape mechanism described in the original Thymeleaf docs: https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#text-literals