Totara Learn Open Discussions

Charset / Data cleaning before display?

 
John Unnever
Charset / Data cleaning before display?
von John Unnever – Wednesday, 12 December 2018, 10:24 AM
Gruppe 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?
von Craig Eves (Totara Support) – Thursday, 13 December 2018, 1:50 PM
Gruppe 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