Hermes Agent
2810233af4
fix(renderer): extend _al_stash to include <img> tags, preventing autolink from mangling src= URLs
...
Bug: the autolink pass stashed <a> tags (via _al_stash) before running,
but did not stash <img> tags. When  was converted to an <img>
tag by the image pass, the subsequent autolink regex matched the URL
inside src="..." and wrapped it in <a href="...">url</a>, producing
src="<a href="...">url</a>" — a completely broken image source.
Fix: extend the _al_stash regex from:
(<a\b[^>]*>[\s\S]*?<\/a>)
to:
(<a\b[^>]*>[\s\S]*?<\/a>|<img\b[^>]*>)
This stashes both <a> and self-closing <img> tags before autolink runs,
then restores them after, so the URL inside src= is never touched.
Adds 7 regression tests in tests/test_issue487b.py.
2026-04-14 22:09:36 +00:00
..
2026-03-30 20:40:19 -07:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-09 18:05:23 -07:00
2026-04-11 10:17:52 -07:00
2026-04-14 17:14:01 +00:00
2026-04-13 14:28:24 -07:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-13 00:08:30 -07:00
2026-04-14 21:13:33 +00:00
2026-04-13 11:40:15 -07:00
2026-04-13 12:36:11 -07:00
2026-04-13 22:41:31 -07:00
2026-04-14 21:14:00 +00:00
2026-04-14 21:14:33 +00:00
2026-04-14 21:52:34 +00:00
2026-04-14 22:09:36 +00:00
2026-04-14 17:13:03 +00:00
2026-04-13 22:57:58 -07:00
2026-04-14 17:14:01 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:35:52 +00:00
2026-04-14 17:13:03 +00:00
2026-04-14 19:06:35 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-12 00:11:41 -07:00
2026-04-13 22:57:58 -07:00
2026-04-13 00:51:55 -07:00
2026-04-13 22:11:45 -07:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:10:23 +00:00
2026-04-14 19:04:48 +00:00
2026-04-11 20:06:37 -07:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-14 19:04:48 +00:00
2026-04-11 12:19:12 -07:00
2026-04-14 19:04:48 +00:00
2026-04-12 10:51:48 -07:00
2026-04-12 11:08:59 -07:00
2026-04-12 12:50:32 -07:00
2026-04-12 14:07:00 -07:00
2026-04-12 14:26:00 -07:00
2026-04-14 19:10:23 +00:00
2026-04-12 14:28:16 -07:00
2026-04-12 21:45:25 -07:00
2026-04-14 21:04:37 +00:00
2026-04-13 11:11:56 -07:00
2026-04-13 23:25:26 -07:00
2026-04-14 19:04:48 +00:00
2026-04-09 18:08:29 -07:00
2026-04-10 10:02:28 -07:00
2026-04-12 00:19:33 -07:00
2026-04-13 22:11:45 -07:00