I've just discovered yet another way in which lxml is mangling my HTML. I'm fed up with fixing
around the edges.
So in the next week or so, I will try re-implement regular expressions to find and replace the
<img> tags. Given that malthe seems to think it's a reasonable idea I'll do it inside repoze.bitblt
on a branch first.
So, any ideas on how to robustly find <img> tags in HTML via regexes? Any example
implementations?
Also, what kind of backwards compatibility does repoze.bitblt require? Should I replace the
existing rewrite_image_tags or implement a new one alongside and implement some kind of
configurability into ImageTransformationMiddleware?
__________________________________
Repoze Bugs <bu...@bugs.repoze.org>
<http://bugs.repoze.org/issue103>
__________________________________
_______________________________________________
Repoze-dev mailing list
Repoz...@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev
Please do it on trunk, and do it well. I've wanted this for a long
time––and for squeeze, too.
> So, any ideas on how to robustly find <img> tags in HTML via regexes? Any example
> implementations?
It's always robust since <img> is never a complex tag.
> Also, what kind of backwards compatibility does repoze.bitblt require? Should I replace the
> existing rewrite_image_tags or implement a new one alongside and implement some kind of
> configurability into ImageTransformationMiddleware?
The primary interface is HTML, so I think we shouldn't worry much
about the actual library code interface. I could be wrong on this
assumption.
\malthe
Fixed in revision 8095 by using regexes instead of lxml to parse img tags.
----------
status: chatting -> resolved
__________________________________
Repoze Bugs <bu...@bugs.repoze.org>
<http://bugs.repoze.org/issue103>
__________________________________