Ticket #1100 (open enhancement)
[url][img] with disabled images
- Created: 2017-02-12 13:19:07
- Reported by: kitsunyan
- Assigned to: None
- Milestone: None
- Component: parser
- Priority: normal
When I disable images in my account settings, I see only links to previews in posts. So I can't view a full image normal way. That's because thumbnail links are wrapped with full image links:
<a href="image-url" rel="nofollow"><a href="thumbnail-url" rel="nofollow">image-description</a></a>
It would be great if parser handled these situations and displayed only top-level link (or both of them).
History
Visman 2017-02-12 16:29:25

parser.php
// Deal with [url][img]http://example.com/test.png[/img][/url]
if (preg_match('%<img src=\"(.*?)\"%', $url, $matches))
return handle_url_tag($matches[1], $url, $bbcode);
after add
// perhaps inside there was a picture which is displayed as the link
if (preg_match('%^<a href=".++(?<=</a>)$%D', $url)) {
return $url;
}