Change URLs

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Change URLs

breathem
Hi all.
I need to change URLs in href and src attributes "on fly" without th:ref functionality.
For example, change <link href="../../style.css"> to <link href="domain.com/somefolder/style.css".
Of course i can get processed template by calling templateEngine.process(template, ctx) and then operate it with some HTML parser...
But are there some elegant ways to do that?
Interceptors in annoparser before/while/after templateEngine.process(...) call?
Else?
Thanks in advance.