Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
HTML entities?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hamish Lawson  
View profile  
 More options Aug 29 2006, 6:18 am
From: "Hamish Lawson" <hamish.law...@gmail.com>
Date: Tue, 29 Aug 2006 10:18:32 -0000
Local: Tues, Aug 29 2006 6:18 am
Subject: HTML entities?
Kid allows HTML entities ("nbsp", "pound", etc.) in templates. Are
there plans to do likewise for Markup?

Hamish Lawson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Boos  
View profile  
 More options Aug 29 2006, 7:08 am
From: Christian Boos <cb...@neuf.fr>
Date: Tue, 29 Aug 2006 13:08:01 +0200
Local: Tues, Aug 29 2006 7:08 am
Subject: Re: HTML entities?
Hamish Lawson wrote:
> Kid allows HTML entities ("nbsp", "pound", etc.) in templates. Are
> there plans to do likewise for Markup?

It is supported, simply use the appropriate doctype.

e.g.

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:py="http://markup.edgewall.org/"
  xmlns:xi="http://www.w3.org/2001/XInclude">

some content...&nbsp;some more...

</html>

-- Christian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hamish Lawson  
View profile  
 More options Aug 29 2006, 7:26 am
From: "Hamish Lawson" <hamish.law...@gmail.com>
Date: Tue, 29 Aug 2006 11:26:12 -0000
Local: Tues, Aug 29 2006 7:26 am
Subject: Re: HTML entities?

Christian Boos wrote:
> [HTML entities are] supported, simply use the appropriate doctype.

Of course. I was blinded to that by the fact that this declaration
doesn't have any effect in Kid (I believe because ElementTree ignores
it) - support for HTML entities had to be specially added to Kid.

Thanks.

Hamish Lawson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher Lenz  
View profile  
 More options Aug 29 2006, 12:43 pm
From: Christopher Lenz <cml...@gmx.de>
Date: Tue, 29 Aug 2006 18:43:28 +0200
Local: Tues, Aug 29 2006 12:43 pm
Subject: Re: HTML entities?
Am 29.08.2006 um 13:26 schrieb Hamish Lawson:

> Christian Boos wrote:

>> [HTML entities are] supported, simply use the appropriate doctype.

> Of course. I was blinded to that by the fact that this declaration
> doesn't have any effect in Kid (I believe because ElementTree ignores
> it) - support for HTML entities had to be specially added to Kid.

Kid uses a custom Expat-based parser, so ElementTree isn't involved  
in that step of the process. In fact, the Markup XMLParser is very  
similar to that in Kid, which in turn is very similar to the parser  
in ElementTree. But they all have their own implementation :-P

Anyway, the Kid parser instructs Expat to let it handle entity  
references itself, so that Expat basically ignores the DTD. The Kid  
parser then looks up any entity in a table of HTML entity definitions  
(using the Python module "htmlentitydefs").

I've just changed the Markup XMLParser to do the same thing:

   <http://markup.edgewall.org/changeset/259>

meaning that you can now use HTML entities in your Markup templates  
without having to declare the DTD.

I should probably add a way to override this behavior, but at least  
for templates I think it makes a lot of sense.

Feedback on this change welcome, as always ;-)

Cheers,
Chris
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hamish Lawson  
View profile  
 More options Aug 30 2006, 7:01 am
From: "Hamish Lawson" <hamish.law...@gmail.com>
Date: Wed, 30 Aug 2006 11:01:56 -0000
Local: Wed, Aug 30 2006 7:01 am
Subject: Re: HTML entities?

Christopher Lenz wrote:
> you can now use HTML entities in your Markup templates
> without having to declare the DTD.

Even nicer!

Hamish


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »