This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30124 - HTML tags are allowed in the alt attribute text of an image tag
Summary: HTML tags are allowed in the alt attribute text of an image tag
Status: RESOLVED WONTFIX
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-12 19:47 UTC by zck1
Modified: 2017-06-12 22:50 UTC (History)
1 user (show)

See Also:


Attachments

Description zck1 2017-06-12 19:47:22 UTC
The validator does not currently detect a problem of a person putting HTML tags such as italic <i> in the text of the alt attribute of an image tag <img>.
Comment 1 Michael[tm] Smith 2017-06-12 22:50:56 UTC
There’s no good way to prevent this. An author may intentionally put a "<" character in an alt attribute for legitimate reasons; e.g., alt="Image showing '2 < 5'" or even "<img>" or whatever other markup; e.g., alt="Image showing an syntax-highlighted <img> element with the 'alt' attribute"