Some strings formatted like HTML tags are stripped from source code blocks
-
Some strings formatted like HTML tags are stripped from source code blocks. For example, the following line:
DEBUG: Crawled (200) <GET http://www.mtq.gouv.qc.ca/pls/apex/f?p=102:56:1394212499594427::NO:RP::> (referer: None)
Becomes:
DEBUG: Crawled (200) (referer: None)
Even when enclosed in a [sourcecode] block.
The same applies to something like this:
>>> row2_cells[0]
<HtmlXPathSelector xpath=’td’ data=u'<td class=”t3data” align=”center”>Which becomes:
>>> row2_cells[0]
Is there any workaround or fix for this?
NOTE: If I edit my post in HTML, save and preview, the “offending” strings will show up. However, once I switch to the rich text editor and back to the HTML editor, the strings have been stripped and a new save of the post will remove them from the preview.
Blog url: http://syslogd.wordpress.com/ -
Are you inserting the blocks following this guide?
-
Yes. I’ve had the time to investigate a bit more and this seems to happen only after saving while in the HTML editor. To show you I am not crazy, here’s a video of what happens just after pressing “Save Draft” while in the HTML editor (I forgot to capture the save operation, but I pressed the button just before starting the recording).
http://api.cld.me/3Y0I1d0M0y201l3q1T1Q/download/wp-sourcecode-block-issue.mov
If I save while in the Visual editor, the strings are not stripped and appear in both the Visual and HTML editor. If I forget and save in the HTML editor, all those strings get stripped and on the next save, the actual post (preview in my case) will not contain the strings.
Thanks for your help with this.
-
-
Just posted:
http://blog.syslogd.net/2011/11/24/civic-hacking-with-python-part-2/
Let me know if you’d like a test case. I could create a small sample you could test with, see if you can replicate what happens on my side.
-
-
Download this text file: http://f.cl.ly/items/2H2c3i1y0N2e3F3i2p2U/wp-sourcecode-testcase.txt
Then follow the instructions inside.
I was able to reproduce the issue with Safari 5.1.1 and Firefox 7.0.1 on OS X Lion 10.7.1
Let me know if you need anything else.
-
Thanks for the sample file! I was able to reproduce this error, as per your directions. I’ve passed this information along to our team so they can take a closer look at the problem.
In the meantime, I would suggest typing up all of your text in the Visual Editor and then switching to the HTML editor when you’re ready to insert the sourcecode. I know it’s not a perfect solution, but for now it’s the best way to make sure you don’t loose any of your text when toggling back and forth between the Visual and HTML editors.
- The topic ‘Some strings formatted like HTML tags are stripped from source code blocks’ is closed to new replies.