Forum OpenACS Development: Re: Best practices for "Smart Quotes"?

Collapse
Posted by Gustaf Neumann on
you mean, pasted into plain textarea, or pasted into a richtext widget? For the latter one, we switched a while ago to ckedit, which works nice and supports mobile devices. it has a paste from word, and also vice versa, an extra plugin for creating smart quotes while you are typing in the text area.

In general, tidy is still very helpful to clean up wierd input. e.g. "tidy ... -b ..." strips smart quotes and em-dashes.

Collapse
Posted by Dave Bauer on
Thanks,

I do recall now I have used Tidy before. Can I just call it from a shell script? Is that the easiest way. It shouldn't be called that much as there are not that many editors in this application.

Collapse
Posted by Gustaf Neumann on
Dave, have a look at xowiki-utility-procs.tcl [1]. it contains a function callable like in:
 set cleanText [::xowiki::tidy clean $text]
it should be straightforward to modify this for your needs.

-g
[1] xowiki::tidy