Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-04 15:02:20

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

txp:breadcrumb outputs malformed HTML when in frontpage.

Hi,

When using txp:breadcrumb, the output in frontpage is a malformed HTML tag.

<code><txp:breadcrumb wraptag=“div” label=“Inicio” sep=”>” link=“y” title=“1” /></code>

In frontpage, it returns
<code><div /></code>
As far as I tested, changing or removing attributes didnt have any effect.

Also, it escapes HTML elements in section/category title. I mean, if you have a section title like this: <code><abbr title=“Textpattern”>TXP</abbr> plug-ins</code>, in the breadcrumb the <code><abbr></code> is escaped, and you will get something like:

<code>Home > <abbr title=“Textpattern”>TXP</abbr> plug-ins</code>

That’s all.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#2 2005-11-04 22:42:18

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

Also, it escapes HTML elements in section/category title.

That’s intentional. If we didn’t, you couldn’t have a title like ‘A & B’ or ‘A > B’. I’d expect more than just breadcrumbs to break if you’re using HTML in titles.


Alex

Offline

#3 2005-11-04 23:12:37

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

<blockquote>That’s intentional. If we didn’t, you couldn’t have a title like ‘A & B’ or ‘A > B’. I’d expect more than just breadcrumbs to break if you’re using HTML in titles.</blockquote>

Sure you could. With permitted HTML, a rendered title of A & B or A > B would simply mean an internat title of A &38; B or A &62; B. (or &amp; &gt; for the word entities)


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#4 2005-11-04 23:44:50

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

With permitted HTML, a rendered title of A & B or A > B would simply mean an internat title of A &38; B or A &62; B. (or & > for the word entities)

Please elaborate, I really don’t understand what you’re suggesting.


Alex

Offline

#5 2005-11-04 23:50:12

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

NyteOwl: That’s what it already does: the html is escaped. maniqui wants the html stripped.

Offline

#6 2005-11-05 00:59:02

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

Maybe I misunderstood. I thought he was saying that you couldn’t add html (including entities such as <code> &#38 </code>) and have it display properly as it would be displayed as literals.

So the conditions regarding the HTML for <code><b><acronym title=“yadayada”>A &#38 B</acronym></b></code> are:

Rendered: <b><acronym title=“yadayada”>A & B</acronym></b>
Escaped: <code><b><acronym title=“yadayada”>A &#38 B</acronym></b></code>
Stripped: A B

The rendered is the desired condition but unless I misunderstood the actual result is the escaped version, similar to the effect of putting the [code] tags around code here on the forums.

<i>(Note: the semi-colon has been left off the UTF-8 numeric entity as the forum software keeps displaying the apersand rather than the numeric form otherwise. Ditto the use of [] around the word ‘code’.)</i>


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#7 2005-11-05 01:22:23

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

If we changed the code as you seem to be suggesting (not escaping or modifying the title at all, if I understand you), many titles would break – most obviously, ‘A & B’.


Alex

Offline

#8 2005-11-05 03:46:31

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

> maniqui wrote:

<blockquote>When using txp:breadcrumb, the output in frontpage is a malformed HTML tag.

<code><txp:breadcrumb wraptag=“div” label=“Inicio” sep=”>” link=“y” title=“1” /></code>

In frontpage, it returns
<code><div /></code>
As far as I tested, changing or removing attributes didnt have any effect. </blockquote>

This is the bug I have reported.

The other is just a note I added about what was happening when using HTML elements in titles.
More details about my opinion on the changes in relation to HTML elements and article titles here

Saludos!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#9 2005-11-05 03:56:03

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

In FrontPage? That’s not a bug. That’s called “not real markup”.

Offline

#10 2005-11-05 04:01:48

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

Frontpage? As in MS FrontPage? That’s a markup virus :-D


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#11 2005-11-05 04:04:20

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

<blockquote>In FrontPage? That’s not a bug. That’s called “not real markup”.</blockquote>

Is this a joke about FrontPage and Microsoft and double senses? Sorry if I didnt catch it. Some jokes in english are far from my capacity. But when in doubt, it’s better to laugh, so: jajajajaja (spanish laugh).

Going back to the bug:
I will explain it again: if you use txp:breadcrumb, then in the frontpage (default page, homepage, call it as you want) TXP outputs a malformed div tag, like this: <code><div /></code>, where it should output <code><div>Site_name (or whatever you put in label)</div></code>


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#12 2005-11-05 05:22:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: txp:breadcrumb outputs malformed HTML when in frontpage.

Oooh, now I understand. The breadcrumb tag output isn’t supposed to appear on the front/default page at all, but rather than nothing, he gets back:

<div />

I just checked, I get the same. I also get some stupid notices too, but…

Offline

Board footer

Powered by FluxBB