Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#2111 closed change (fixed)

[CMS] Support links with target="_blank" in strings

Reported by: trev Assignee:
Priority: P3 Milestone:
Module: Sitescripts Keywords:
Cc: saroyanm Blocked By: #2133
Blocking: #2035 Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: yes
Review URL(s):

Description

Background

Normally, foo <a href="bar">link</a> bas. is converted into a translatable string foo <a>link</a> bas. and referenced as $s123(bar)$ in the page source. However, this won't work with links that have target="_blank" attribute - these have to stay unchanged in the page source and break up strings unnecessarily.

What to change

Allow representing links that open in a new tab, e.g. by prepending them with a star: $s123(*bar)$. Then links with target="_blank" can be generated by the CMS, just like regular links.

Change History (5)

comment:1 Changed 5 years ago by trev

  • Blocking 2035 added
  • Cc 2035 removed

comment:2 Changed 5 years ago by saroyanm

  • Cc saroyanm added

comment:3 Changed 5 years ago by trev

  • Blocked By 2133 added

comment:4 Changed 5 years ago by trev

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed by #2133, the default translation can now have any attributes on the <a> tag and these will be kept.

comment:5 Changed 5 years ago by Ross

  • Verified working set

Implemented and working. Attributes are kept on links.

Tested by:
Creating a CMS page that includes target="_blank" translatable link. Also running the website converter script as per the read me and checking the links in the output.

Tested with:
www / r18024
sitescripts / r501
web.adblockplus.org / r68
website-converter / master / 105208883c4336a3788820fe9ab379cf639f8387

Note: See TracTickets for help on using tickets.