Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphic Image: Since PF 12 ismap attribute is rendered and causing invalid HTML #9373

Closed
Bukama opened this issue Nov 3, 2022 · 5 comments · Fixed by #9374
Closed

Graphic Image: Since PF 12 ismap attribute is rendered and causing invalid HTML #9373

Bukama opened this issue Nov 3, 2022 · 5 comments · Fixed by #9374
Assignees
Labels
🐞 defect Bug...Something isn't working
Milestone

Comments

@Bukama
Copy link
Contributor

Bukama commented Nov 3, 2022

Describe the bug

Since Primefaces 12 the Graphic Image renderes a ismap attribute with the values true or false, resulting in invalid HTML:

pf_img_ismap

While the ismap attribute is allowed on the image-tag and it is a boolean type, the correct syntax is to only add ismap when the image is a server side map and don't use it, when the image is not map, see this example from W3C:

<a href="/action_page.php">
  <img src="w3html.gif" alt="W3Schools.com" width="100" height="132" ismap>
</a>

If I've read the commit history right, the change was introduced with commit f08ba1e3d57cc82b1a07f3a4ebb2098eec532e15 in PR #8772 to fix #7943.

Reproducer

Check showcase of Graphic Image

Expected behavior

  • The ismap attribute is only rendered when true
  • The ismap attribute is rendered as definied by the W3C, meaning without a value

PrimeFaces edition

Community

PrimeFaces version

12.0.0

Theme

No response

JSF implementation

All

JSF version

2.2

Java version

8

Browser(s)

all

@Bukama Bukama added ‼️ needs-triage Issue needs triaging 🐞 defect Bug...Something isn't working labels Nov 3, 2022
@melloware
Copy link
Member

Duplicate of: #9369

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2022
@melloware melloware added 🚫 duplicate Duplicate of a similar issue and removed 🐞 defect Bug...Something isn't working ‼️ needs-triage Issue needs triaging labels Nov 3, 2022
@melloware melloware added this to the 13.0.0 milestone Nov 3, 2022
@melloware melloware self-assigned this Nov 3, 2022
@Bukama
Copy link
Contributor Author

Bukama commented Nov 3, 2022

Oh sorry, I had the task to create an issue laying on my desk for about two weeks and didn't double checked if there was an issue created in the meantime :(

@melloware
Copy link
Member

No problem!

@melloware
Copy link
Member

I better test the TRUE scenario I fixed the false scenario.

@melloware melloware reopened this Nov 3, 2022
@melloware melloware added 🐞 defect Bug...Something isn't working and removed 🚫 duplicate Duplicate of a similar issue labels Nov 3, 2022
melloware added a commit to melloware/primefaces that referenced this issue Nov 3, 2022
@melloware
Copy link
Member

This PR makes it render correctly with false and true.

	<img id="j_id_90" src="/showcase/javax.faces.resource/images/nature/nature4.jpg.xhtml?ln=demo">
	<img id="j_id_91" src="/showcase/javax.faces.resource/images/nature/nature4.jpg.xhtml?ln=demo" ismap="ismap">

ismap="ismap" is the JSF XHTML way of rendering booleans and still passes the NuHTML checker as valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 defect Bug...Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants