Opened 15 years ago
Closed 15 years ago
#174 closed defect (fixed)
AddHyperlinksAndLineBreaks template remove existing HTML code in text parameter
Reported by: | fxp | Owned by: | fxp |
---|---|---|---|
Priority: | minor | Milestone: | v2.5.0 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
if text parameter already contains HTML, the template will remove it because using value-of instead of copy-of.
For example the problem occurs on:
- codelist contains <b> tags,
- onlinesource <a> tag
- other text may contains <br/>
The following code does not solve the problem, but does not process text when having HTML in it:
<xsl:variable name="textnode" select="exslt:node-set($text)"/> <xsl:choose> <xsl:when test="$edit"> <xsl:copy-of select="$text"/> </xsl:when> <xsl:when test="count($textnode/*) > 0"> <!-- In some templates, text already contains HTML (eg. codelist, link for download). In that case copy text content and does not resolve hyperlinks. --> <xsl:copy-of select="$text"/> </xsl:when> <xsl:otherwise> <xsl:call-template name="addHyperlinksAndLineBreaks"> <xsl:with-param name="txt" select="$text"/> </xsl:call-template> </xsl:otherwise> </xsl:choose>
Change History (2)
comment:1 by , 15 years ago
Owner: | changed from | to
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Committed revision 5811.