Edgewall Software

Opened 17 years ago

Closed 17 years ago

#144 closed enhancement (fixed)

Using ${select(...)} syntax where text isn't allowed breaks templates XML compliance

Reported by: michael@… Owned by: cmlenz
Priority: minor Milestone: 0.5
Component: Template processing Version: 0.4.3
Keywords: Cc:

Description

This template is invalid XHTML:

<head>
  ${select("*[local-name()!='title']")}
</head>

Because text data isn't allowed directly inside <head>.

So I have to use something like this to keep my template valid XHTML:

<head>
  <meta py:replace="select('*[local-name()!=\'title\']')" />
</head>

A special element would be nice as using <meta> or another arbitrary tag is confusing. Perhaps allowing py:replace to be used as an element such as:

<head>
  <py:replace>select("*[local-name()!='title']")</py:replace>
</head>

This would have the pleasant side effect of not forcing me to escape the quotes around title.

Change History (1)

comment:1 Changed 17 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from new to closed

py:replace can be used as an element as of [773]:

<head>
  <py:replace value="select('*[local-name()!=\'title\']')" />
</head>
Note: See TracTickets for help on using tickets.