When writing some technical content, often writing html to be shown to the end user, I use (xmp html tags)

Drupal changes the content within these tags to the correct html..

eg - I will miss off the < and the > in this example.

xmp strong /xmp

will display as

strong /strong

There is a something cleaning up bad html, but it should ignore code within the pre and xmp tags.

Comments

enterprisereview’s picture

Version: 6.9 » 6.6
dman’s picture

Drupal cleaning up your code?
You sure it's not a WYSIWYG or input filter issue?

Even within a PRE, that's not valid XHTML (though you could have got away with it in HTML4)

If doing real XMP, you should probably use a namespace prefix, but if you just want to create valid XHTML that a browser can use, then you could use &lt;xmp&gt;

OR use a codefilter processor that will correctly render your verbatim code in a way that a browser won't choke on, eg by escaping it with entities.

You'd have to describe your setup a bit more - are you using a WYSIWYG? and what input format and input filters are you using? And is that result you pasted an actual view-source or just from the DOM inspector (which lies)?

enterprisereview’s picture

no wysiwig
no filters, default set up.
source view

The work arounds, yes, I have done that, but I am raising the fact the clean up needs to understand pre and xmp tags.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.