The Advanced Guide, page 90 "Including an 'Email A Friend' Link into Actinic" needs a tweak or it will fail if there is a single quote in the product name. E.g. O'Reilly PHP Cookbook.
The quick fix is to replace the fragment
with
But the better fix would be to replace the article with the following
The quick fix is to replace the fragment
Code:
<Actinic:Variable Name="ProductName"/>
Code:
<actinic:block php="true">echo rawurlencode('<Actinic:Variable Name="ProductName" encoding="perl" selectable="false" />');</actinic:block>
Code:
Enter e-mail address to tell a friend <input type=text value="" size=40 onchange=" var thisloc=location.href + '%23<Actinic:Variable Name="EncodedProductAnchor"/>'; if (this.value != '') { location.href = 'mailto:' + this.value + '?subject=' + escape('Take a look at ') + '<actinic:block php="true">echo rawurlencode('<Actinic:Variable Name="ProductName" encoding="perl" selectable="false" />');</actinic:block>' + '&body=' + escape('I saw ') + thisloc + escape(' and thought you would be interested.'); } "> <input type=button value="OK">
Comment