I didn't even remember I made this post but stumble upon this by change during a search. Anyway, the reason I made a reply is because I've found a solution (loooong after I forgot about this post) so I want to put it here for reference.
svg won't play nice with the image viewer, so I need to convert it to <img>. Here is my regex replacement string:
search:
Code:
<div\sclass=\"svg_outer(.*?)xlink:href=\"(.*?)\"(.*?)</div>
replace:
Code:
<p> </p>
<div class="svg_outer svg_inner">
<img style="max-width:100%;max-height:100%" height="auto" width="auto" src="\2"></img>
</div>
The one line empty space is needed because if the image is too big, somehow a different behavior is trigger when double tap.