Modify ↓
Ticket #272 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.

This bug has been fixed in the SVN tree, revision r391.
Thank you for the report, and for helping us make Phing better!