-
Notifications
You must be signed in to change notification settings - Fork 77
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
The API should convert relative media path to absolute #3321
Comments
The relative path in question when displaying the source code for this description :
|
Hum, what about if we change the Geotrek-admin URL. |
Totally agree 👍 Anyway, it is not flexible to work with stored HTML. Maybe in the future storing the content with markdown would make manipulations more flexible. |
Geotrek mobile handle this case here : https://github.com/GeotrekCE/Geotrek-mobile/blob/main/src/app/services/settings/settings.service.ts#L290 |
Corrigé dans la 2.98.1 |
From the description fields, it is possible to attach media. The
src
attribute is filled with a relative path instead of an absolute path.Whatever service connects to the API should not parse the content to add the base path of the admin URL.
For example:
![image](https://user-images.githubusercontent.com/1926041/201939755-3b383ccf-2851-47cd-96fa-e0a5e214dd28.png)
A description given by a trek endpoint https://admin-pyrenees-orientales.fr/api/v2/trek/254789/?fields=description
And below the UI for the user ⬇️
The text was updated successfully, but these errors were encountered: