Totara Learn Open Discussions

Charset / Data cleaning before display?

 
UnneverJohn
Charset / Data cleaning before display?
UnneverJohn 发表于 2018年12月12日 Wednesday 10:24
小组 Partners

When a user fills out an appraisal .. they are copying large amounts of text from word documents and pasting it into the input boxes while going through the appraisal process..  If i write some php to grab that data and then echo it out, i am seeing a bunch of odd characters like squares and certain quotes are either missing or duplicated etc.   What functions are you guys using to clean up the data before you display it back out to the user in your appraisal pages?  They appear to be clean and free of these extra characters in  your display but a standard php echo has the problem.



Craig Eves
Re: Charset / Data cleaning before display?
Eves (Totara Support)Craig 发表于 2018年12月13日 Thursday 13:50
小组 Totara

Hi John

I can't provide an answer but think it may be better to use a plugin for the Atto editor designed for cleaning Word content as there will be a lot of superfluous code in the editor otherwise https://moodle.org/plugins/atto_wordimport

Regards