Marcoil has uploaded a new change for review.
https://gerrit.wikimedia.org/r/82439
Change subject: Bug 53357: Catch already-decoded titles from the request params
......................................................................
Bug 53357: Catch already-decoded titles from the request params
Change-Id: I9cb5a30d0ea0a099473b5f28f41d57d15284db91
---
M js/tests/server/server.js
1 file changed, 9 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid
refs/changes/39/82439/1
diff --git a/js/tests/server/server.js b/js/tests/server/server.js
index c667b99..c0b37a7 100755
--- a/js/tests/server/server.js
+++ b/js/tests/server/server.js
@@ -506,7 +506,7 @@
var receiveResults = function ( req, res ) {
req.connection.setTimeout(300 * 1000);
- var title = decodeURIComponent( req.params[0] ),
+ var title,
result = req.body.results,
skipCount = result.match( /<skipped/g ),
failCount = result.match( /<failure/g ),
@@ -515,6 +515,14 @@
var commitHash = req.body.commit;
var perfstats = parsePerfStats( result );
+ // Get the title. Some versions of express pass the param already
decoded,
+ // so we need to work around that
+ try {
+ title = decodeURIComponent( req.params[ 0 ] );
+ } catch( e ) {
+ title = req.params[ 0 ];
+ }
+
skipCount = skipCount ? skipCount.length : 0;
failCount = failCount ? failCount.length : 0;
errorCount = errorCount ? errorCount.length : 0;
--
To view, visit https://gerrit.wikimedia.org/r/82439
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cb5a30d0ea0a099473b5f28f41d57d15284db91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Marcoil <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits