[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T133267: Escape extlink content when containing ] anywhere

2017-03-24 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344632 )

Change subject: T133267: Escape extlink content when containing ] anywhere
..


T133267: Escape extlink content when containing ] anywhere

Change-Id: Ic2ef54d79c98966cb77f8efdbc53b349496d1f9f
---
M lib/html2wt/escapeWikitext.js
M tests/parserTests.txt
2 files changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/html2wt/escapeWikitext.js b/lib/html2wt/escapeWikitext.js
index 666ba2a..d2eb1fe 100644
--- a/lib/html2wt/escapeWikitext.js
+++ b/lib/html2wt/escapeWikitext.js
@@ -154,7 +154,7 @@
 };
 
 WEHP.aHandler = function(state, text) {
-   return text.match(/\]$/);
+   return text.match(/\]/);
 };
 
 WEHP.tdHandler = function(tdNode, inWideTD, state, text, opts) {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2b8d9d4..cf4fdc9 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -23848,7 +23848,8 @@
 parsoid=html2wt
 !! html/parsoid
 http://google.com;>[google]
-http://google.com;>google]
+http://google.com;>google]
+http://google.com;>goog] le
 [http://google.com]
 [http://google.com google]
 [http://google.com;>http://google.com]
@@ -23856,6 +23857,7 @@
 !! wikitext
 [http://google.com [google]]
 [http://google.com google]]
+[http://google.com goog] le]
 
 [http://google.com]
 
@@ -23867,6 +23869,7 @@
 !! html/php
 http://google.com;>[google]
 http://google.com;>google]
+http://google.com;>goog] le
 [http://google.com]
 [http://google.com google]
 [http://google.com;>http://google.com]

-- 
To view, visit https://gerrit.wikimedia.org/r/344632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2ef54d79c98966cb77f8efdbc53b349496d1f9f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T133267: Escape extlink content when containing ] anywhere

2017-03-24 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344632 )

Change subject: T133267: Escape extlink content when containing ] anywhere
..

T133267: Escape extlink content when containing ] anywhere

Change-Id: Ic2ef54d79c98966cb77f8efdbc53b349496d1f9f
---
M lib/html2wt/escapeWikitext.js
M tests/parserTests.txt
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/32/344632/1

diff --git a/lib/html2wt/escapeWikitext.js b/lib/html2wt/escapeWikitext.js
index 666ba2a..d2eb1fe 100644
--- a/lib/html2wt/escapeWikitext.js
+++ b/lib/html2wt/escapeWikitext.js
@@ -154,7 +154,7 @@
 };
 
 WEHP.aHandler = function(state, text) {
-   return text.match(/\]$/);
+   return text.match(/\]/);
 };
 
 WEHP.tdHandler = function(tdNode, inWideTD, state, text, opts) {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2b8d9d4..e500b2d 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -23848,7 +23848,8 @@
 parsoid=html2wt
 !! html/parsoid
 http://google.com;>[google]
-http://google.com;>google]
+http://google.com;>google]
+http://google.com;>goog] le
 [http://google.com]
 [http://google.com google]
 [http://google.com;>http://google.com]
@@ -23856,6 +23857,7 @@
 !! wikitext
 [http://google.com [google]]
 [http://google.com google]]
+[http://google.com goog] le]
 
 [http://google.com]
 

-- 
To view, visit https://gerrit.wikimedia.org/r/344632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2ef54d79c98966cb77f8efdbc53b349496d1f9f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits