ext-mbstring should be required
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing Masterminds\HTML5\Parser\CharacterReference::lookupDecimal() and Masterminds\HTML5\Parser\UTF8Utils::convertToUTF8(), focusing on their unconditional mbstring use and iconv/utf8_decode fallbacks. Done means mbstring is required, iconv and utf8_decode fallback code are removed, and the parser continues to handle non-auto input encodings correctly.
Written by the indexing model from the issue text.
Description
Here's why:
Masterminds\HTML5\Parser\CharacterReference::lookupDecimal()usesmb_decode_numericentity()unconditionally.- Looking at
Masterminds\HTML5\Parser\UTF8Utils::convertToUTF8()either iconv or mbstring must be available (if the input encoding is not 'auto').
This would allow to:
- Get rid of iconv() use. In my experience mbstring is really a better solution.
- Remove use of utf8_decode() which is not really valid and not needed when mbstring is available.
- Get rid of the fallback code.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Masterminds/html5-php
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Masterminds/html5-php#280 ·
-
help-wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Masterminds/html5-php#252 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Masterminds/html5-php#251 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Masterminds/html5-php#250 · 5 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
Masterminds/html5-php#246 · 1 comment ·
All issues in Masterminds/html5-php
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
solidjs/solid-router#652 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
shadps4-emu/shadps4-qtlauncher#453 ·
Maintainers usually reply within 2 days
-
[BUG] Reports tab: "Unban" button tooltip shows raw `{{ip}}` placeholder instead of the IP addressOpenbug javascript ui
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bunkerity/bunkerweb#4001 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
Maintainers usually reply within 1 day