Add another looser selector for catching pasted references

Bug: T232461
Change-Id: I82eef25fbbaa4b583fac660b172541db3160c99c
This commit is contained in:
Ed Sanders 2019-09-10 12:32:10 +01:00
parent a3eb620570
commit c8582df1b9

View file

@ -119,8 +119,15 @@ ve.init.mw.Target.static.importRules.external.blacklist = ve.extendObject( {
}, ve.init.mw.Target.static.importRules.external.blacklist );
ve.init.mw.Target.static.importRules.external.htmlBlacklist.remove = ve.extendObject( {
// TODO: Create a plugin system for extending the blacklist, so this code
// can be moved to the Cite extension.
// Remove reference numbers copied from MW read mode (T150418)
'sup.reference:not( [typeof] )': true
'sup.reference:not( [typeof] )': true,
// ...sometimes we need a looser match if the HTML has been mangled
// in a third-party editor e.g. LibreOffice (T232461)
// This selector would fail if the "cite_reference_link_prefix" message
// were ever modified, but currently it isn't.
'a[ href *= "#cite_note" ]': true
}, ve.init.mw.Target.static.importRules.external.htmlBlacklist.remove );
/**