PHP 7 weird output
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 361
- Avg merge
- 3d 41m
- Merged PRs (30d)
- 2
Description
Using PHP 7 the output of René & Danny is René & Danny instead of the expected René & Danny. It's a specific character combination, you can test it using the following PHP code:
$msg = ['Testé &', 'Testéé &', 'Testé
& text &','Testéé & text
&','Testééé & text &'];
$pur_config = ['HTML.Allowed' =>
'br,p,strong,ol,ul,li,em,i,u,a[href]','HTML.TargetBlank' => true];
foreach($msg as $val){
echo $val." - ".\Purify::clean($val, $pur_config)."<br />";
}
This behaviour is only on PHP 7, using the exact same code on PHP 5 the output will be as expected.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with the provided PHP 7 reproduction and trace the Purify::clean entry point, comparing its output with PHP 5 for the listed character combinations. The fix is complete when the PHP 7 output preserves René as René while still encoding the ampersand as &.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100