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

HTMLEntityCodec Mysteriously decodes &or #827

Closed
xeno6696 opened this issue Jan 23, 2024 · 11 comments
Closed

HTMLEntityCodec Mysteriously decodes &or #827

xeno6696 opened this issue Jan 23, 2024 · 11 comments
Labels

Comments

@xeno6696
Copy link
Collaborator

Somehow the input &origin=ourprogram is translated to ∨igin=ourprogram

See discussion in #824

@xeno6696 xeno6696 added the bug label Jan 23, 2024
@planetlevel
Copy link

planetlevel commented Jan 23, 2024 via email

@planetlevel
Copy link

planetlevel commented Jan 23, 2024 via email

@xeno6696
Copy link
Collaborator Author

I hadn't gone in to check its backing codepoint which is where my trust would be placed, but the reason that it's mysterious is that I'm not familiar with an named HTML entity for OR. Somehow when I cracked the Codec yesterday I missed line 509:

image

Hence why I thought it was mysterious.

@xeno6696
Copy link
Collaborator Author

This is working as designed, not a bug.

@kwwall
Copy link
Contributor

kwwall commented May 28, 2024

@xeno6696 - You closed this as 'completed' and a comment that says "This is working as designed, not a bug", but what I wanted to ask about was that you left 2 Junit tests in HTMLEntityCodecTest.java are marked as @Ignore. I understand that was more for future research, but it seems to me that we should either remote those tests or make it match the ∨ (that is, the logical OR, ∨). In general, I don't like to leave tests as ignored. I just noticed this when I ran mvn test and saw that 2 tests were skipped.

Would you prefer I just delete the tests or try to patch them up, along with a comment about how the whole safe-harbor makes it recognize the first 3 characters of '&origin=ourprogram' as the logical OR entity?

@planetlevel
Copy link

planetlevel commented May 28, 2024 via email

@xeno6696
Copy link
Collaborator Author

@planetlevel both render in chrome and safari, that’s enough for me.

@xeno6696
Copy link
Collaborator Author

Feel free to delete the tests.

@kwwall
Copy link
Contributor

kwwall commented May 29, 2024

@xeno6696 wrote:

@planetlevel both render in chrome and safari, that’s enough for me.

I assume you were testing both browsers on MacOS then. On Linux Mint 21.3 neither the latest version of Firefox or Chrome treats &or as entity encoding without the trailing ';'. I find it odd that Chrome on MacOS would be different. Or maybe you tested with a different entity-encoding.

@planetlevel
Copy link

planetlevel commented May 29, 2024 via email

@xeno6696
Copy link
Collaborator Author

xeno6696 commented May 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants