Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/187866

Change subject: [WIP] Don't corrupt href="./" in internal links
......................................................................

[WIP] Don't corrupt href="./" in internal links

Only a failing test for now

Change-Id: Ieedd71a991c6b52225f2ac41ebe1a20e7533c19e
---
M modules/ve-mw/tests/dm/ve.dm.mwExample.js
1 file changed, 34 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/66/187866/1

diff --git a/modules/ve-mw/tests/dm/ve.dm.mwExample.js 
b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
index 1e56d57..33b90f9 100644
--- a/modules/ve-mw/tests/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/tests/dm/ve.dm.mwExample.js
@@ -1669,6 +1669,40 @@
                        wgArticlePath: '/wiki/$1'
                }
        },
+       'internal link with href set to ./': {
+               body: '<p><a rel="mw:WikiLink" href="./"> </a></p>',
+               head: '<base href="http://example.com"; />',
+               data: [
+                       { type: 'paragraph' },
+                       [
+                               ' ',
+                               [ {
+                                       type: 'link/mwInternal',
+                                       attributes: {
+                                               title: '',
+                                               origTitle: '',
+                                               normalizedTitle: '',
+                                               lookupTitle: '',
+                                               hrefPrefix: './'
+                                       },
+                                       htmlAttributes: [
+                                               {
+                                                       values: {
+                                                               href: './',
+                                                               rel: 
'mw:WikiLink'
+                                                       },
+                                                       computed: {
+                                                               href: 
'http://example.com/'
+                                                       }
+                                               }
+                                       ]
+                               } ]
+                       ],
+                       { type: '/paragraph' },
+                       { type: 'internalList' },
+                       { type: '/internalList' }
+               ]
+       },
        'numbered external link (empty mw:Extlink)': {
                body: '<p>Foo<a rel="mw:ExtLink" 
href="http://www.example.com";></a>Bar</p>',
                data: [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieedd71a991c6b52225f2ac41ebe1a20e7533c19e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to