I'm working on a joomla site that use JotCache as cache component. To exclude from cache some modules directly on template files, this component use own "markers" such as:
<jot myposition s> Module Position <jot myposition e>
Now, i'm trying to minify html trough php using DOMDocument but the result is this and the cache component doesn't work:
<jot myposition s> Module Position <jot myposition e></jot></jot>
I'm thinking to use preg_replace to strip the </jot>
closing tag.
I tried this regex "/<[\/]*jot[^>]*>/i"
but it strips all <jot>
tags, including the required <jot myposition s>
and <jot myposition e>
.
Since I'm not sure how to accomplish this with DOMDocument (prevent tags closing automatically), how can I do this with preg_replace?
Any ideas would be very appreciated.
Thanks.