Posted by salvis on January 20, 2008 at 3:05am
5 followers
| Project: | Drupal core |
| Version: | 6.x-dev |
| Component: | other |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
<cite> and <code> are allowed by the default filter, and drupal_html_to_text() should support them.
This is a bug report, not a feature request, IMO.
Comments
#1
Hope the patch helps.
#2
No, this is too simple. Maybe it works for <code>, which should just be rendered as it's entered, with all spaces and newlines intact (but I suspect that it's line-wrapped), but <cite> needs to be emphasized in some way, at least with double quotes.
#3
The patch renders:
code - 4 spaces indent, surrounded by a newline, preserve all spaces
cite - surround by a 'sharp' symbol, e.g.
<cite>Report on Space Management</cite>, Butch Saul, 1997 -> #Report on Space Management#, Butch Saul, 1997What we can do with a long lines in 'code' ?
I suggest add the '/' symbol at the end of each wrapped line. But maybe it is not good.
#4
Code tags do not preserve white space in HTML. They should be treated like any other inline tag.
#5
Oh, it's true.
Well, how to emphasize inline code tags here?
1) You can use the %code lnline% tag to define computer code.
2) You can use the {code lnline} tag to define computer code.
3) You can use the [code lnline] tag to define computer code.
4) You can use the -code lnline- tag to define computer code.
What tag should be used for multiline code snippets, 'pre' ?
#6
There is no HTML tag that does what people expect. Pre only preserves white space, but still requires ampersands and angles to be escaped. This is why codefilter exists.
#7
I've consulted with http://en.wikipedia.org/wiki/Lightweight_markup_language and have decided:
The patch provides this.
#8
By default, every browser I've ever known renders
<cite>in italics, so it seems like for consistency, we should use /cite/ just like we do for<i|em>. Also, note that you need to support attributes in these tags. See #258192: drupal_html_to_text() doesn't support <strong class="foo">#9
Does this issue exist in current D6?
#10