ezyang / ezyang/htmlpurifier

Element 'map' is not supported

Open
#482 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
3.4k
Forks
361
Avg merge
3d 41m
Merged PRs (30d)
2

Description

Hello,

Example of code before HTMLpurifier :

<img src='.../mymap.gif' width="378" height="358" border="0" usemap="#Map">
<map name="Map"> 
  <area shape="poly" coords="224,2,235,2,250,10,274,27,274,36,248,39,240,17,230,15" href="https://test.com" >
  <area shape="poly" coords="211,27,211,8,224,4,229,15,239,17,246,39" href="https://test2.com">
</map>

The same code AFTER HTMLpurifier :

<img src='.../mymap.gif' width="378" height="358" border="0">

The map element is in the HTML specification : https://html.spec.whatwg.org/#the-map-element

The map element is supported by the browsers.

Why the map element is NOT supported by HTMLpurifier ?

Best regards.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue’s before-and-after HTMLPurifier example and trace how supported HTML elements are defined and tested. There are no files or tests named in the report, so locate the element-definition path and comparable element tests; done means map, area, and the image’s usemap attribute are retained while filtering remains safe.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.