[WayBack] Lesson learned: do not copy/paste code from the Visual
WordPress.com editor; copy from the Text
editor or the Preview
… – Jeroen Wiert Pluimers – Google+.
Note: likely the HTML below got rendered badly by WordPress.com, so the gist below has the same text as a MarkDown file.
Ever wonder why copy-pasting code from your WordPress.com post fails?
The first statement fails, but the second works:
[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
useradd: unrecognized option '--shell /bin/false'
...
[root@linux:/etc] # useradd --create-home --shell /bin/false autossh24
[root@linux:/etc] #
The reason is that the first is copied from the Visual
WordPress.com editor that renders this HTML inserting
which is a different unicode characer (0x00A0) than a normal space (0x0020):
<blockquote><p><code data-mce-selected="1"># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></p></blockquote>
However, the the second copied from the Text
WordPress.com editor succeeds because it has all regular spaces:
<blockquote><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></blockquote>
Luckily the Preview
render is correct:
<blockquote><p><code># <strong>useradd --create-home --shell /bin/false autossh24</strong></code></p></blockquote>
Lesson learned: do not copy/paste code from the Visual
WordPress.com editor; copy from the Text
editor or the Preview
.
–jeroen
[WayBack] Ever wonder why copy-pasting code from your WordPress.com post fails?
Read the rest of this entry »
Like this:
Like Loading...