mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Allow 'nofollow' on external links in Parsoid output
Bug: T321437 Change-Id: I4070b3b16c8b2b76a0e7a67599efd914cbde63aa
This commit is contained in:
parent
e115c05504
commit
fdb7390d27
|
@ -35,6 +35,8 @@ OO.inheritClass( ve.dm.MWExternalLinkAnnotation, ve.dm.LinkAnnotation );
|
||||||
|
|
||||||
ve.dm.MWExternalLinkAnnotation.static.name = 'link/mwExternal';
|
ve.dm.MWExternalLinkAnnotation.static.name = 'link/mwExternal';
|
||||||
|
|
||||||
|
// Allow 'nofollow' in Parsoid output (T321437)
|
||||||
|
// Allow all unknown types for external paste (handled in toDataElement)
|
||||||
ve.dm.MWExternalLinkAnnotation.static.allowedRdfaTypes = null;
|
ve.dm.MWExternalLinkAnnotation.static.allowedRdfaTypes = null;
|
||||||
|
|
||||||
ve.dm.MWExternalLinkAnnotation.static.toDataElement = function ( domElements, converter ) {
|
ve.dm.MWExternalLinkAnnotation.static.toDataElement = function ( domElements, converter ) {
|
||||||
|
|
|
@ -39,6 +39,9 @@ ve.dm.MWMagicLinkNode.static.matchTagNames = [ 'a' ];
|
||||||
|
|
||||||
ve.dm.MWMagicLinkNode.static.matchRdfaTypes = [ 'mw:WikiLink', 'mw:ExtLink' ];
|
ve.dm.MWMagicLinkNode.static.matchRdfaTypes = [ 'mw:WikiLink', 'mw:ExtLink' ];
|
||||||
|
|
||||||
|
// Allow 'nofollow' in Parsoid output (T321437)
|
||||||
|
ve.dm.MWMagicLinkNode.static.allowedRdfaTypes = [ 'nofollow' ];
|
||||||
|
|
||||||
ve.dm.MWMagicLinkNode.static.disallowedAnnotationTypes = [ 'link' ];
|
ve.dm.MWMagicLinkNode.static.disallowedAnnotationTypes = [ 'link' ];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,6 +39,9 @@ ve.dm.MWNumberedExternalLinkNode.static.matchTagNames = [ 'a' ];
|
||||||
|
|
||||||
ve.dm.MWNumberedExternalLinkNode.static.matchRdfaTypes = [ 'mw:ExtLink', 've:NumberedLink' ];
|
ve.dm.MWNumberedExternalLinkNode.static.matchRdfaTypes = [ 'mw:ExtLink', 've:NumberedLink' ];
|
||||||
|
|
||||||
|
// Allow 'nofollow' in Parsoid output (T321437)
|
||||||
|
ve.dm.MWNumberedExternalLinkNode.static.allowedRdfaTypes = [ 'nofollow' ];
|
||||||
|
|
||||||
ve.dm.MWNumberedExternalLinkNode.static.disallowedAnnotationTypes = [ 'link' ];
|
ve.dm.MWNumberedExternalLinkNode.static.disallowedAnnotationTypes = [ 'link' ];
|
||||||
|
|
||||||
ve.dm.MWNumberedExternalLinkNode.static.matchFunction = function ( domElement ) {
|
ve.dm.MWNumberedExternalLinkNode.static.matchFunction = function ( domElement ) {
|
||||||
|
|
Loading…
Reference in a new issue