[fix] Decode url in tag base #4733
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add url decode in tag base
Original Report
Steps to reproduce the issue
Expected result
(this is what appears in the head for English and other languages using latin characters with no diacritics)
base href="http://wilddogdesigngroup.com/us/about"
[...]
link href="http://wilddogdesigngroup.com/us/about" rel="canonical"
link href="http://wilddogdesigngroup.com/mm/မိတ်ဆက်" rel="alternate" hreflang="my-MM"
link href="http://wilddogdesigngroup.com/cn/为什么选择我们" rel="alternate" hreflang="zh-CN"
link href="http://wilddogdesigngroup.com/id/mengapa-kami" rel="alternate" hreflang="id-ID"
link href="http://wilddogdesigngroup.com/my/kenapa-kami" rel="alternate" hreflang="ms-MY"
link href="http://wilddogdesigngroup.com/th/เหตุผลที่ควรเลือกเรา" rel="alternate" hreflang="th-TH"
link href="http://wilddogdesigngroup.com/vi/tại-sao-chọn-chúng-tôi" rel="alternate" hreflang="vi-VN"
Actual result
(this is what appears in the head for languages using non-latin characters (Chinese, Burmese, Thai) as well as latin characters with diacritics (Vietnamese); the example below is from Thai)
base href="http://wilddogdesigngroup.com/th/%E0%B9%80%E0%B8%AB%E0%B8%95%E0%B8%B8%E0%B8%9C%E0%B8%A5%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B9%80%E0%B8%A3%E0%B8%B2"
[...]
link href="http://wilddogdesigngroup.com/th/เหตุผลที่ควรเลือกเรา" rel="canonical"
System information (as much as possible)
PHP Built On Linux serv01.ams2.siteground.eu 2.6.32.59-sg3 #9 SMP Wed Sep 26 03:29:25 CDT 2012 x86_64
Database Version 5.5.32-31.0-log
Database Collation utf8_general_ci
PHP Version 5.3.29
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Additional comments
In a nutshell, the alternate URLs are correctly appearing in the head of the site on pages in languages using latin characters. They don't appear on pages with latin characters + diacritics (Vietnamese) or non-latin scripts (Chinese, Burmese)