[MGNLUI-4102] Wrongly replacing of html links in i18n messages Created: 19/Dec/16  Updated: 20/Feb/18  Resolved: 12/Apr/17

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.4.9, 5.4.10
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Won't Fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Repository: Jackrabbit 2.8
Database: Mysql 6 (InnoDB)
Application server: Apache Tomcat 7.0
Java version: Oracle Java 1.7
Operating system: Linux


Issue Links:
causality
duplicate
duplicates MAGNOLIA-6887 TranslationService replaces html link... Closed
relation
is related to PAGES-32 Fix link to get templates Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Created according to SUPPORT-6926, please reference to linked ticket for detail description and discussion.
If you want to render a i18n message which contains a html link, the link will be replaced by <a rel="nofollow">.

It is reproducible on demoauthor instance. Open the groovy console and execute the following statement.

info.magnolia.objectfactory.Components.getComponent(info.magnolia.i18nsystem.TranslationService.class).translate(new info.magnolia.i18nsystem.FixedLocaleProvider(Locale.ENGLISH), ["pages.noAvailableTemplatesAlert.createTemplateLink"] as String[]) 


 Comments   
Comment by Frank Sommer [ 22/Feb/17 ]

Bug is still (M5.4.11 & M5.5.2) existing.

https://demopublic.magnolia-cms.com/contact.html?mgnlFormToken=58480b3f-e188-44b3-b582-60f9cf4671e9

Comment by Jan Haderka [ 12/Apr/17 ]

HTML links in translations files are sanitized for security reasons. See MAGNOLIA-6728 for details. If you need to place links in pages, do this directly from templates, not via translation files. If you need links in AdminCentral, links need to be provided as targets for buttons not via labels brought in via translation files.

Generated at Mon Feb 12 09:13:18 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.