spring mvc - Process Thymeleaf attributes multiple times -


i able store html thymeleaf attributes strings in database. able store html without thymeleaf attributes already:

method in controller class

// method string database first @modelattribute("somecode") public string populatesomecode() {     return "this <h1>some code</h1>"; } 

index.html

<!doctype html> <html xmlns:th="http://www.thymeleaf.org"> ...   <body>     <div th:utext="${somecode}">html go here</div>   </body> </html> 

this produce desired result of displaying h1 saying "this code".

i wondering if possible include thymeleaf attributes in string , have attributes processed. if changed string be:

"this <h1 th:text=\"'another string'\">some code</h1>" 

i result h1 saying "this string", still "this code". there way this?

have tried use thymeleaf __${expression}__ preprocessor feature?

like this:

"this __<h1 th:text=\"'another string'\"> code</h1>__" 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -