Modify

Ticket #272 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Using CDATA with ReplaceTokens values

Reported by: dk@… Owned by: hans
Priority: minor Milestone: 2.3.1
Component: phing-core Version: 2.3.1RC1
Keywords: Cc:

Description

sending value as a property in ReplaceTokens filter causes problem, in some cases you need to use content with CDATA.

Add This to Token Class in phing/filters/ReplaceTokens.php

    /**
     * Sets the token value from text.
     *
     * @param string $value The value for this token. Must not be <code>null</code>.
     */
    function addText($value) {
        $this->setValue($value);
    }

Then you can have tokens like this:

    <token  key="BOX_CONTENT"><![CDATA[[${site.boxBody}]]></token>

You will need this if you have html entities in your token values.

Attachments

Change History

comment:1 Changed 3 years ago by mrook

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

This bug has been fixed in the SVN tree, revision r391.

Thank you for the report, and for helping us make Phing better!

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.