← Back to team overview

mahara-contributors team mailing list archive

[Bug 1802205] Re: Make all external links in Mahara open in external tab/window by default

 

Title:  Make all external links in Mahara open in external tab/window by
default

Bug Summary: Whether an external <a> link has target=_blank or not we
should open them in external tab/window to differentiate mahara site
from external content

Acceptance criteria
--------------------------------------
1. All external links to be opened in new tab/window by default
2. Except for those that have 'target="_self"'
3. And also have any internal links with 'target="_blank"' to open externally
4. Open them in safe no opener way
===========================================

Environment tested: Master
Browser tested: Chrome

Preconditions:  
-----------------------------
1. User exists that has access to Group Forum
2. Group exists
3. Forum exists

Test Steps:  
-----------------------------
1. Log in as SIte admin
2. Browse to a Group forum
3. Create a new topic Subject = New topic 101
4. In the message WYSIWYG editor - create the following links at the top of the page
-- a. URL = https://www.catalyst.net.nz/ Text to display = catalyst None, Target = None
-- b. URL = https://www.catalyst.net.nz/ Text to display = catalyst same page, Target = same page
-- c. URL = https://www.catalyst.net.nz/ Text to display = catalyst new window, Target = new window
-- d. Existing site page - profile page URL = http://mahara.stevens-lp.dynamic.wgtn.cat-it.co.nz/artefact/internal/index.php Text to display = Profile, Target = None
-- e. Existing site page - profile page URL = http://mahara.stevens-lp.dynamic.wgtn.cat-it.co.nz/artefact/internal/index.php Text to display = Profile, Target = same page
-- f. Existing site page - profile page URL = http://mahara.stevens-lp.dynamic.wgtn.cat-it.co.nz/artefact/internal/index.php Text to display = Profile, Target =new window
5. Enter 8 paragraphs and enter an anchor tag at the bottom of the page  
6. create the following links at the top of the page
-- a. URL = #user_cat Text to display = Link to CAT None, Target = None
-- b. URL = #user_cat Text to display = Link to CAT  same page, Target = same page
-- c. URL = #user_cat Text to display = Link to CAT  new window, Target = new window


Expected result:
--------------------  
1. All external links to be opened in new tab/window by default
2. Except for those that have 'target="_self"'
3. And also have any internal links with 'target="_blank"' to open externally
4. Open them in safe no opener way

Actual result: As expected ✔

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1802205

Title:
  Make all external links in Mahara open in external tab/window by
  default

Status in Mahara:
  Fix Committed

Bug description:
  Whether an external <a> link has target=_blank or not we should open
  them in external tab/window to differentiate mahara site from external
  content

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1802205/+subscriptions


References