jenkins-bot has submitted this change and it was merged.
Change subject: BSInsertFile: Fixed issue with pseudo protocol
......................................................................
BSInsertFile: Fixed issue with pseudo protocol
Since commit cecaa242f5618be32ac44afb12e513cb9c02646a @ HW-internal-GIT
the 'href' of an anchor was prefixed with a pseudo protocol part.
This broke the logic to extract the linked file name from the anchor
attributes.
Now the pseudo protocol part gets removed.
NEEDS CHERRY-PICK TO MASTER!
see also HW/ERM-3766
Change-Id: I64f3e8965214971d75cc4255a35f8db7f2aa8fb7
---
M InsertFile/resources/bluespice.insertFile.js
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Mglaser: Looks good to me, approved
jenkins-bot: Verified
diff --git a/InsertFile/resources/bluespice.insertFile.js
b/InsertFile/resources/bluespice.insertFile.js
index 5830697..6bc2c9e 100644
--- a/InsertFile/resources/bluespice.insertFile.js
+++ b/InsertFile/resources/bluespice.insertFile.js
@@ -249,7 +249,8 @@
};
if( anchor.nodeName.toLowerCase() === 'a' ) {
- var prefixedTitle = decodeURIComponent(
anchor.getAttribute( 'href' ) );
+ var href = anchor.getAttribute( 'href' );
//With pseudo protocol, e.g. "bs://Media:Somefile.pdf"
+ var prefixedTitle = decodeURIComponent(
href.replace( /^bs:\/\//i, '' ) );
var wikiLink = new bs.wikiText.Link(
'[['+prefixedTitle+']]');
params = {
title: wikiLink.getTitle(),
--
To view, visit https://gerrit.wikimedia.org/r/300855
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I64f3e8965214971d75cc4255a35f8db7f2aa8fb7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits