Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Special Entities in excerpt
I don’t khow is it bug or what, but I think it is not correct when all » become just “ in code. And all other special entities do the same. So, if I have construction like <H1> in any of the paragraphs that will be included in excerpt it gives me… H1 heading! But I don’t need it, I want to show to my readers only piece of HTML code.
WHY?
P.S. And in article title the same thing, yeah? As I remember, it is because RSS and Atom specifications or what?
Last edited by warmrobot (2007-03-05 07:29:47)
Offline
Re: Special Entities in excerpt
If it’s just a small bit of code, surround it with “at” characters (like the one in email addresses. I can’t make that show up here). For larger blocks of code, prefix it with bc.
or bc..
The same thing works here in the forum.
The title of an article is often also used in the <title>
tag which cannot contain markup.
Last edited by ruud (2007-03-05 07:39:28)
Offline
Re: Special Entities in excerpt
I do not use Textile, sorry :-)
I’ve switched off it everywhere where I can, and writing posts in clear HTML.
So, I need to fix it in HTML.
Offline
Re: Special Entities in excerpt
Double escape: &lt;h1&gt;
(shows up as <h1>
)
Last edited by ruud (2007-03-05 08:05:29)
Offline
Re: Special Entities in excerpt
Did not work.
I’ve tried and saw: <h1> in browser, and &lt;h1&gt; in page code accordingly
By the way: I don’t think that I need write special HTML-code to Textpattern. Textpattern should correctly display normal HTML instead.
Last edited by warmrobot (2007-03-05 08:47:14)
Offline
Re: Special Entities in excerpt
If I choose “leave text untouched” as article/excerpt markup, <h1>
shows up as <h1>
If I choose “use textile” as article/excerpt markup, &lt;h1&gt;
shows up as <h1>
I must admit that the ‘use textile’ method looks a bit strange to me as well. I had expected the first one (with just <h1>
) to work in both situations.
Last edited by ruud (2007-03-05 09:12:32)
Offline
Re: Special Entities in excerpt
You mean, you see it in browser like example of code?
So, I can say that it does’not work in my case. I see it only in body of the article, not in the excerpt. “leave text untouched” is checked.
Which revision your TXP?
Mine – r2249.
Offline
Re: Special Entities in excerpt
I tested the above in 4.0.3 (old version).
When I test in r2249 (fresh from svn) I get a different result: <h1>
shows up as <h1>
no matter if I select “use textile” or “leave text untouched”
Offline
Re: Special Entities in excerpt
Let me understand you clearly. What you see in browser window:
<h1> or Heading marked with h1 HTML tags?
Can you demonstrate me example anywhere?
Last edited by warmrobot (2007-03-05 12:20:15)
Offline
Re: Special Entities in excerpt
When I say “shows up as <h1>
” I mean it shows up that way in the browser as a normal visitor would see it (plain text, not a heading). In the HTML code for that page it looks like <h1>
I don’t have a recent version of TXP running on a publicly accessible server, so I can’t show it unfortunately.
Last edited by ruud (2007-03-05 12:53:23)
Offline
Re: Special Entities in excerpt
ok, thank you.
Well, now I don’t even khow what to think.
Strange thing.
Offline
#12 2007-03-06 01:53:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Special Entities in excerpt
When I enter:
<h1>A Heading</h1>
I get get back:
A Heading
When I enter:
<h1>A Heading</h1>
I get back:
<h1>A Heading</h1>
That is the correct output.
But for some reason, you get back
A Heading
for both?
Ruud, do you get the same? in 4.0.4?
Offline