Copying from Microsoft Office is Bad!

Written by Karl Binder on March 13, 2012

Recently, we’ve come across a lot of issues with websites where random crashes are occurring and/or specific functions aren’t being called in workflows.

After tracing through these issues for a length of time, we come to the root of the issue: Copying text from a Microsoft Office application appends unneeded tags, as well as copies over bad special characters!

For example, an HTML compliant apostrophe is simply a line down. However, the apostrophe from MS Word or Excel is usually curved. The same can be said for an HTML compliant hyphen, which is a short hyphen, whereas MS Word will convert this to a long hyphen.

Usually, the characters do not cause much concern as they are misinterpreted by the HMTL and thus foreign symbols are displayed : ’

However, when the unneeded tags are copied over, the system cannot interpret these tags, and thus breaks by stopping right there. Unfortunately, there is no way of knowing that the issue is a result of this unless you’re actively looking for this scenario, so my advice to you all is :

DO NOT COPY FROM MS WORD OR EXCEL DIRECTLY INTO A WEBPAGE!!!

Use an intermediate step, like copying from Word or Excel to Notepad, and then from Notepad to a Webpage!