Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-03-05 07:28:03

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

Special Entities in excerpt

I don’t khow is it bug or what, but I think it is not correct when all &raquo 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

#2 2007-03-05 07:35:13

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#3 2007-03-05 07:55:58

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

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

#4 2007-03-05 08:02:02

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Special Entities in excerpt

Double escape: &amp;lt;h1&amp;gt; (shows up as &lt;h1&gt;)

Last edited by ruud (2007-03-05 08:05:29)

Offline

#5 2007-03-05 08:41:41

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

Re: Special Entities in excerpt

Did not work.
I’ve tried and saw: &lt;h1&gt; in browser, and &amp;lt;h1&amp;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

#6 2007-03-05 09:08:40

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Special Entities in excerpt

If I choose “leave text untouched” as article/excerpt markup, &lt;h1&gt; shows up as <h1>
If I choose “use textile” as article/excerpt markup, &amp;lt;h1&amp;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 &lt;h1&gt;) to work in both situations.

Last edited by ruud (2007-03-05 09:12:32)

Offline

#7 2007-03-05 09:17:37

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

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

#8 2007-03-05 11:01:02

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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: &lt;h1&gt; shows up as <h1> no matter if I select “use textile” or “leave text untouched”

Offline

#9 2007-03-05 12:19:50

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

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

#10 2007-03-05 12:48:58

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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 &lt;h1&gt;
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

#11 2007-03-05 13:29:56

warmrobot
Member
From: Moscow, Russia
Registered: 2007-01-22
Posts: 31
Website

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:

&lt;h1&gt;A Heading&lt;/h1&gt;

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

Board footer

Powered by FluxBB