-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
htmlspecialchars(): charset `0' not supported, assuming utf-8 #1577
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Probably resolved by Php fix https://bugs.php.net/bug.php?id=71876. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is:
What is the expected behavior?
error message :
htmlspecialchars(): charset `0' not supported, assuming utf-8
in file :
..../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php:90
Trace :
#0 [internal function]: rbinit_exception_error_handler(2, 'htmlspecialchar...', '/usr/share/ranc...', 90, Array)
#1 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php(89): htmlspecialchars('2009-04-02T16:2...')
#2 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php(148): PhpOffice\PhpSpreadsheet\Shared\XMLWriter->writeRawData('2009-04-02T16:2...')
#3 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php(260): PhpOffice\PhpSpreadsheet\Writer\Xlsx\DocProps->writeDocPropsCore(Object(PhpOffice\PhpSpreadsheet\Spreadsheet))
Solution
Can you try to change the line
return $this->writeRaw(htmlspecialchars($text));
to
return $this->writeRaw(htmlspecialchars($text, ENT_QUOTES, 'UTF-8'));
on line 90 of file phpspreadsheet/src/PhpSpreadsheet/Shared/XMLWriter.php
Thanks
What are the steps to reproduce?
Only with specials xlsx workbooks
Which versions of PhpSpreadsheet and PHP are affected?
All
The text was updated successfully, but these errors were encountered: