(bug 42064) Make EditFilterMergedContent more generic.
This is part a the solution to bug 42064: it modifies the EditFilterMergedContent hook
to allow it to be triggered by code outside the EditPage. This is useful when extensions
such as Wikibase implement their own editing mechanism for non-textual content.
Allowing EditFilterMergedContent to be used on non-textual content ensures that
any filters will also be applied to that content.
Note that EditFilterMergedContent was introduced in 1.21 which hasn't been released yet,
so modifying the hooks definition should not be a problem. The only extension that appears
to use the EditFilterMergedContent hook is Translate. I'll supply a patch.
To completely fix bug 42064, I will soon submit two changes to two extensions:
* In the Wikibase extension, trigger the EditFilterMergedContent when changing data
entities.
* In AbuseFilter, make use of the EditFilterMergedContent hook, so filters will also be
applied to non-textual content.
The the dicsussion on bugzilla for the rationale of this architecture.
Change-Id: I99a19c93e99860a91d7f898b0a3fbb72b69baab8