I don't know of any currently existing extension to handle this, but
the creation of one should be relatively straight forward. Here's a
stub:
$wfHooks['ArticleSave'][] = 'removeBadCharsOnSave';
function removeBadCharsOnSave( &$article, &$user, &$text, &$summary ) {
// do something to $text
return true;
}
Not sure exactly what to do to $text. PHP's native utf8_decode() may
do the trick, or you may have to use preg_replace(), or something
else. :/
-- Jim R. Wilson (jimbojw)
On 9/25/07, Christensen, Courtney <ChristensenC(a)battelle.org> wrote:
Hi,
Our set up is: MediaWiki: 1.9.2 (r2132) PHP: 5.2.2 (cgi-fcgi)
MySQL: 5.0.15-nt running on IIS
Our users sometimes author in MS Word and then copy and paste their
article text into the MediaWiki edit box. Word often automatically
changes some characters as you type such as turning a dash into an
mdash, or a single quote into an apostrophe. These things generally
display fine in MediaWiki, however, we have to export the contents of
the wiki to be imported into a final environment for client approval.
Unfortunately I don't have the authority to change the rather odd
process. Since I think the users will continue to paste things in from
Word, does anyone know of an extension or tool which would "clean" the
text input into the wiki? I was unable to find anything like this in
the Extensions pages.
- Courtney Christensen
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l