https://bugzilla.wikimedia.org/show_bug.cgi?id=50826
Krinkle <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|VisualEditor: Add nicer |VisualEditor: Add support |integration with spam |for SpamBlacklist errors in |blacklist in save dialog |save dialog --- Comment #4 from Krinkle <[email protected]> --- So we get the matched url from the API. Ideally we'd get a usable message as well. Given the following sample (and latest mediawiki/core and SpamBlacklist configured with [[m:Spam_blacklist]]) * [http://cl.ly/foo/?bar=%22%3Equ%3Cb%3Eu%3C%2Fb%3Ex%3Ca%20href%3D%22 d] * [http://fidosoft.de fidosoft] index.php?action=submit gives the following: > The text you wanted to save was blocked by the spam filter. This is probably > caused by a link to a blacklisted external site. > The following text is what triggered our spam filter: http://fidosoft.de and > http://cl.ly These are constructed in EditPage::spamPageWithContent by the "spamprotectiontext" and "spamprotectionmatch" messages respectively, which are actually in mediawiki core. The latter message takes $1 as parameter and EditPage.php sets that to the result of Language::listToText( Array ). The API gives: "edit": { "spamblacklist": "http://cl.ly", "result": "Failure" } For some reason it isn't getting the second url? The SpamBlacklist API hook looks like it is doing `implode( '|', Array )` but aside from an array being nicer than a pipe-separated list, we're not getting either. Only the first url is returned. So either: 1) SpamBlacklist needs to provide a processed message or: * SpamBlacklist needs to provide both urls, not just the first (I tested latest master, SpamBlacklist@3390081e4c6). Though this bug should be fixed either way, if we don't get a processed message, needing both is a blocker. * We'll load these 2 core messages as part of ve.init.mw.ViewPageTarget * We'll need an equivalent of Language::listToText in core mediawiki.language.js (though I suppose join(', ') could do meanwhile). -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
