{"id":1086,"date":"2011-05-25T00:00:31","date_gmt":"2011-05-25T07:00:31","guid":{"rendered":"https:\/\/daveworks.net\/web-design-development-tips\/?p=1086"},"modified":"2011-11-29T00:34:10","modified_gmt":"2011-11-29T08:34:10","slug":"free-text-cleaner-for-better-search-results","status":"publish","type":"post","link":"https:\/\/daveworks.net\/web-design-development-tips\/web-tips-and-tricks\/free-text-cleaner-for-better-search-results\/","title":{"rendered":"Free Text Cleaner for Better Search Results"},"content":{"rendered":"<p><strong>The takeaway:<\/strong><br \/>\n<span style=\"color: #800080;\"><em>If you are copying and pasting content from Microsoft Word into your website, use this FREE text cleaner (<a href=\"#textcleaner\">below<\/a>) to clean your text.  (takes seconds)  <\/em><\/span><\/p>\n<p><img decoding=\"async\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27200%27%20height%3D%27199%27%20viewBox%3D%270%200%20200%20199%27%3E%3Crect%20width%3D%27200%27%20height%3D%27199%27%20fill-opacity%3D%220%22%2F%3E%3C%2Fsvg%3E\" data-orig-src=\"https:\/\/daveworks.net\/web-design-development-tips\/wp-content\/uploads\/clean-miscrosoft-word-text-before-pasting-into-website.png\" alt=\"Clean Miscrosoft Word Text Before Pasting into Website image\" title=\"Clean Miscrosoft Word Text Before Pasting into Website\" width=\"200\" height=\"199\" class=\"lazyload alignright size-full wp-image-1119\" \/><\/p>\n<p><strong>Why is this important?  <\/strong><br \/>\nBecause copying and pasting directly from MS Word can leave nasty little characters that:<br \/>\n1) Look freaky to your viewers<br \/>\n2) Prevent Google from giving you great results<\/p>\n<p>Although I wrote about <a href=\"\/web-design-development-tips\/seo\/you-want-better-search-results-clean-your-text\/\">cleaning your text<\/a> a while back I continue to notice that many folks are struggling with having weird characters appear in their websites due to Microsoft formatting madness.  (<em>not to mention that in the background Google is prevented from seeing your content<\/em>)  So I&#8217;m posting our TEXT CLEANER directly in this article:<\/p>\n<p>    <script language=\"JavaScript\">\nvar swapCodes   = new Array(8211, 8212, 8216, 8217, 8220, 8221, 8226, 8230, 8482, 174, 177, 937, 176, 189, 188, 8364); \/\/ dec codes from char at\nvar swapStrings = new Array(\"--\", \"--\", \"'\",  \"'\",  \"\\\"\",  \"\\\"\",  \"*\",  \"...\", \"(tm)\", \"(R)\", \"+\/-\", \"ohms\", \" degrees \", \"1\/2\", \"1\/4\", \"euro\");  \nfunction cleanWordClipboard(input) {\n    \/\/ debug for new codes\n    \/\/ for (i = 0; i < input.length; i++)  alert(\"'\" + input.charAt(i) + \"': \" + input.charCodeAt(i));    \n    var output = input;\n    for (i = 0; i < swapCodes.length; i++) {\n        var swapper = new RegExp(\"\\\\u\" + swapCodes[i].toString(16), \"g\"); \/\/ hex codes\n        output = output.replace(swapper, swapStrings[i]);\n    }\n    return output;\n}\n<\/script><br \/>\n<a name=\"textcleaner\"><\/a>\t<\/p>\n<h3>This text cleaner will clean the following nasty characters when copying and pasting from a Microsoft&reg; Word document, into your website:<\/h3>\n<p>    &ldquo;Double Quotes&rdquo; |  &lsquo;Single quotes&rsquo; | Ellipsis &hellip; | em-dash &mdash; | trademark &trade; | registration trademark &reg; <\/p>\n<div style=\"border:dashed 1px #4c82a6; padding:10px; margin:10px;\">\n<form name=\"wordCleaner\" onsubmit=\"return false;\">\n      <strong>Paste in original MS Word Text:<\/strong><br \/>\n      <textarea style=\"width: 500px; height: 150px\" id=\"wordInput\"><\/textarea><\/p>\n<div align=\"center\">\n <button onClick='document.getElementById(\"wordOutput\").value = cleanWordClipboard(document.getElementById(\"wordInput\").value)'>Clean the text<\/button>\n      <\/div>\n<p>      <strong>Copy this clean text and paste into your website<\/strong><br \/>\n      <textarea style=\"width: 500px; height: 150px\" id=\"wordOutput\"><\/textarea><br \/>\n    <\/form>\n<\/p><\/div>\n<p>For those folks who are using <a href=\"https:\/\/wordpress.org\" title =\"Wordpress CMS\" rel=\"nofollow\" target=_blank\">WordPress <\/a>to publish content, there's already an awesome plain text converter built right in.  Here's a post illustrating <a href=\"https:\/\/daveworks.net\/web-design-development-tips\/seo\/cleaning-your-text-in-wordpress-part-deux\/\" title=\"How to use WordPress to Paste as Plain Text\">how to use WordPress' Paste as Plain Text Function<\/a><\/script><\/p>\n<p>Do you need other characters added to the cleaner?  Just ask below in the comments and we&#8217;ll make it happen.  <a href=\"\/web-design-development-tips\/resources-tools\/\" title=\"Check out other resources on the Daveworks site\">Check out other resources on the Daveworks site<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The takeaway: If you are copying and pasting content from&hellip; <a class=\"continue\" href=\"https:\/\/daveworks.net\/web-design-development-tips\/web-tips-and-tricks\/free-text-cleaner-for-better-search-results\/\">Continue Reading<span> Free Text Cleaner for Better Search Results<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,190],"tags":[193,188,187,379,378,377,189,192,191],"class_list":["post-1086","post","type-post","status-publish","format-standard","hentry","category-web-tips-and-tricks","category-wordpress","tag-free-text-cleaner-for-better-search-results","tag-how-do-i-clean-text-in-wordpress","tag-how-do-i-clean-text","tag-how-to-clean-text-for-websites","tag-how-to-paste-clean-text-into-a-cms-or-html-editor","tag-how-to-remove-unwanted-formatting-from-text","tag-paste-as-plain-text-in-wordpress","tag-wordpress-tips","tag-wordpress-tips-and-tricks"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/posts\/1086","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/comments?post=1086"}],"version-history":[{"count":47,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/posts\/1086\/revisions"}],"predecessor-version":[{"id":1767,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/posts\/1086\/revisions\/1767"}],"wp:attachment":[{"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/media?parent=1086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/categories?post=1086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daveworks.net\/web-design-development-tips\/wp-json\/wp\/v2\/tags?post=1086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}