Remove whitespace and hidden tags

Please be aware that you may be inadvertently adding extra whitespace and hidden tags when you copy posts into the Add New Post input box. These extra tags cause the following problems:

  • Text, especially in quotes, that is a different font, color or size than normal
  • YouTube links that do not display when the post is saved
  • Extra white space at the end of posts

In some cases, this is caused because writers compile their post in a word processor before adding them to Newslines. The word processor may add extra tags. However, most of the time the extra tags are added when you copy quotes and other text from web pages.

You can see these tags by clicking on the TEXT tab on the top right-hand side of the input box (next to the VISUAL tab). Clicking on this tab will show the HTML code for the post. A normal post will look like this:

Liberia<a href=”http://edition.cnn.com/2014/07/28/health/ebola/index.html”>closes</a> most of the country’s borders. President Sirleaf:

<blockquote>No doubt the Ebola virus is a national health problem.</blockquote>

You can see tags for the link, which starts with <a href=”html link to source”>link text</a> and for the quote, which looks like: <blockquote>quote text</blockquote>. The YouTube link is clean.

However, if your post has extra tags it may look like this:

<p>Liberia<a href=”http://edition.cnn.com/2014/07/28/health/ebola/index.html”>closes</a> most of the country’s borders. President Sirleaf:</p>

<blockquote><span style=”color: #000000;”>No doubt the Ebola virus is a national health problem.</span></blockquote>

<div>http://www.youtube.com/watch?v=Ru_Qc7NqVX0</div>
&nbsp;
&nbsp;

<span style=”color: #000000;”></span>, <p></p> and <div></div> are all extra tags and usually cause formatting issues.

&nbsp; is a whitespace character. Extra whitespace between posts looks bad and interrupts the flow of the Newsline.

All of these must be removed for the post to display properly.

How to remove extra tags

You can delete tags manually, by simply selecting each tag and deleting it. However, the preferred method of removal is to remove them when you add the text to the post input box.

  1. Add your text to the post input box.
  2. Select the entire text.
  3. Click the Eraser icon to remove all formatting. Note, you will lose any italics in your post. You will not lose any links.
  4. Quickly check the TEXT tab to see if the tags have been removed.

How to remove trailing whitespace

  1. Try to select text at the end of your post.
  2. If nothing can be selected there is no white space.
  3. If you do select blank text, simply hit the delete key to removed.

To avoid this problem entirely, some writers only work in the TEXT view of the input box.

We are currently working on a solution to automatically strip these tags out, it should be ready in a few weeks.

Was this article helpful?

Related Articles

Leave A Comment?