J has uploaded a new change for review.
https://gerrit.wikimedia.org/r/63417
Change subject: (bug 48300) escape title in edit url
......................................................................
(bug 48300) escape title in edit url
escape title with encodeURIComponent
so creating subtitles works for
titles with question marks.
Bug: 48300
Change-Id: I6443dceb2f9aa3d6fa7ffe5fafe3ae4c343e06bd
---
M TimedTextPage.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler
refs/changes/17/63417/1
diff --git a/TimedTextPage.php b/TimedTextPage.php
index 0f6c8e2..b2ae8d8 100644
--- a/TimedTextPage.php
+++ b/TimedTextPage.php
@@ -161,7 +161,7 @@
'var articlePath =
mw.config.get( "wgArticlePath" );' .
'var paramSep =
(articlePath.indexOf("?")===-1) ? "?" : "&";' .
'var title = ' . json_encode(
$timedTextTile ) . '.replace("LANG", $("#timedmedia-tt-input").val());'.
- 'window.location =
articlePath.replace(/\$1/, title + ' .
+ 'window.location =
articlePath.replace(/\$1/, encodeURIComponent(title) + ' .
' paramSep + "action=edit" ) '
.
'});' .
'});'
--
To view, visit https://gerrit.wikimedia.org/r/63417
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6443dceb2f9aa3d6fa7ffe5fafe3ae4c343e06bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: J <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits