Skip to content

Pod::Simple::XHTML: better fallback when HTML::Entities isn't installed #189

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xenu
Copy link

@xenu xenu commented Jun 17, 2025

This commit changes the default set of escaped characters in the fallback code to be the same as in HTML::Entities.

Fixes #188

@xenu
Copy link
Author

xenu commented Jun 17, 2025

Added a test for this. Probably won't work under Perl 5.6, too bad.

@xenu xenu force-pushed the xenu/entities branch 2 times, most recently from 71bb8b9 to c05b941 Compare June 18, 2025 01:37
@xenu
Copy link
Author

xenu commented Jun 18, 2025

Fixed tests, they failed on most CI configurations, because I forgot to update the number of skipped tests in the case when HTML::Entities isn't installed.

@khwilliamson
Copy link
Contributor

I would like the test to work on EBCDIC. Fortunately this is trivial to do. Just change the non-ASCII character to B6, and change the supporting text to correspond. One possibility would be. "The pilcrow, \xb6, is used to mark the beginning of a new paragraph" B6 is the only non-ASCII character that has the same meaning in Latin1
and EBCDIC

This commit changes the default set of escaped characters in the
fallback code to be the same as in HTML::Entities.

Fixes perl-pod#188
@khwilliamson
Copy link
Contributor

I went searching, and discovered HTML5::Entities which knows many more definitions than plain HTML::Entities. Should that be the default, with the plain being the first fallback?

I also found Pod::Escapes, which ships with core since 5.12,, and automatically handles EBCDIC back to 5.7.3 which is good enough, and is available back to as far as we would ever need. Should this be another fallback?

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

Successfully merging this pull request may close these issues.

Pod::Simple::XHTML doesn't escape non-ASCII characters when HTML::Entities isn't installed
2 participants