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

Fix alt text stripping accents and single quotes #2514

Merged
merged 3 commits into from
May 28, 2024
Merged

Conversation

Tofandel
Copy link
Contributor

@Tofandel Tofandel commented Mar 1, 2024

The altTextFrom method doesn't work well for non english characters and accents, it also uppercases every word which is weird

The altTextFrom method doesn't work well for non english characters and accents, it also uppercases every word which is weird
@@ -63,9 +63,6 @@ function bytesToHuman($bytes)
*/
function replaceAccents($str)
{
if (function_exists('mb_convert_encoding')) {
return mb_convert_encoding($str, 'ASCII', 'UTF-8');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove this after adding tests é would be converted into ? instead of e which could result in empty filenames

@ifox ifox merged commit 33cad70 into area17:3.x May 28, 2024
11 checks passed
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.

None yet

2 participants