getgrav / getgrav/grav-plugin-admin

Russian media filename stored incorrect in page content

Open
#1,591 2 comments 0 reactions 0 assignees View on GitHub
evaluating
Dominant language
PHP
Stars
377
Forks
225
Avg merge
11h 51m
Merged PRs (30d)
4

Description

When i try to put the picture with cyrillic characters in tfilename to the page content it looks pretty strange
![2019-01-14 1 25 24](https://user-images.githubusercontent.com/5689796/51091447-bb39ae00-179b-11e9-8a13-10fbe17dc15b.png)
Filename and preview in the default media box are displayed correctly
![2019-01-14 1 25 32](https://user-images.githubusercontent.com/5689796/51091456-cd1b5100-179b-11e9-86af-1b6412e7fed6.png)
But when i click on the "eye" icon it points me to 404-page

On the frontend link to image in IMG tag is broken and pointed to the wrong location
![2019-01-14 1 26 00](https://user-images.githubusercontent.com/5689796/51091466-f76d0e80-179b-11e9-9395-33d5b2878ba7.png)

Therefore, using simple digit name for image i have no issues
![2019-01-14 1 36 34](https://user-images.githubusercontent.com/5689796/51091555-fdafba80-179c-11e9-8cd2-aa5f78ac7976.png)

How to transliterate files on the fly? Or, maybe, set random filenames on any uploaded media as a fast solution?

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by uploading an image with Cyrillic characters, opening it through the media box eye icon, and checking the frontend IMG link. Compare the stored filename and generated URLs with the working digit-only filename case; done when both preview and frontend links resolve correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
content, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.