noosfero | tinymce: ensure urls are relative but start with the leading slash (!1635)

Rodrigo Souto gitlab at mg.gitlab.com
Wed Oct 24 14:35:52 BRST 2018


New Merge Request !1635

https://gitlab.com/noosfero/noosfero/merge_requests/1635

Project:Branches: diguliu/noosfero:tinymce-url-treatment to noosfero/noosfero:master
Author:    Rodrigo Souto
Assignee:  


After the new update of Tinymce the default configuration of url treatment enforce relative urls. So in cases where the user add urls that with the same domain of the page Tinymce removes the domain. The problem is that it also removes the leading `/` making the url relative to the path being acessed. This was causing problems when referencing contents that were on other pages. E.g.: if Ze was posting a new article on his blog and wanted to reference an image that was on his gallery he would fill the url with `/ze/gallery/my-image.png` or `my-domain.com/ze/gallery/my-image.png` and tiny would convert it `ze/gallery/my-image.png`. Now when I access this post which is on `/ze/blog/post-1` the url image is converted to `my-domain.com/ze/blog/ze/gallery/my-image.png` which obviously does not exist.

With this options the urls are always converted to the relative url with the leading `/`, therefore in the previous example both urls entered and also `ze/gallery/my-image.png` would be converted to `/ze/gallery/my-image.png` which will work fine everywhere.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1635
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20181024/d3d33a3f/attachment.html>


More information about the Noosfero-dev mailing list