Making WordPress.org

Opened 5 years ago

Closed 4 years ago

#2189 closed defect (worksforme)

Forums: Detect non-image URLs in <img> tags

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Support Forums Keywords:

Description (last modified by SergeyBiryukov)

With the upgrade to bbPress 2.x, it's now possible to insert images directly into support forum posts.

However, most new forum members incorrectly use <img> tags for web pages instead of images, which results in a broken image in their post. A recent example:

<img src="https://gyazo.com/c57448863a8cd682d3bc6ba718506547" alt="Shipping Options" />

The URL here is a web page with an image, but not the image itself.

This should be more user-friendly. We could probably detect that the URL provided for src is not an image and automatically convert the code to a regular link in that case:

<a href="https://gyazo.com/c57448863a8cd682d3bc6ba718506547">Shipping Options</a>

Change History (4)

#1 @SergeyBiryukov
5 years ago

  • Description modified (diff)

This ticket was mentioned in Slack in #forums by sergey. View the logs.

5 years ago

This ticket was mentioned in Slack in #meta by sergey. View the logs.

4 years ago

#4 @SergeyBiryukov
4 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

The img button was removed in [5737], so this should no longer be an issue.

#2097 would be the preferred way of inserting images into posts.

Note: See TracTickets for help on using tickets.