Home » Text » Text_Wiki » Bug #5953
£-sign doesn't get converted to £ in links
Details
| Submitted | 2005-11-14 07:42 UTC |
|---|---|
| From | jocke at selincite dot com |
| Assigned | toggg |
| Status | Closed |
| Package | Text_Wiki |
| PHP Version | 4.4.0 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-11-14 07:42 UTC] jocke at selincite dot com
Description:
------------
When using UTF-8 encoded PHP files and setting the appropriate setFormatConf the £-sign gets correctly encoded into £ if it doesn't exist within an a-tag. If the £-sign is within the a-tag then the sign is left untouched (which does display OK for me).
Excellent package, thanks!
Test script:
---------------
<?php
$sText = "This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright.";
print($sText);
require_once("Text/Wiki.php");
$oTextWiki =& new Text_Wiki();
$oTextWiki->setFormatConf('Xhtml', 'charset', 'UTF-8');
print($oTextWiki->transform($sText, 'Xhtml'));
?>
Expected result:
----------------
This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright.<p>This <em>string</em> <strong>contains</strong> a pound £ sign. This link also <a href="http://example.com/" onclick="window.open(this.href, '_blank'); return false;">contains a £ sign</a> but this one is allright.</p>
Actual result:
--------------
This //string// **contains** a pound £ sign. This link also [http://example.com/ contains a £ sign] but this one is allright.<p>This <em>string</em> <strong>contains</strong> a pound £ sign. This link also <a href="http://example.com/" onclick="window.open(this.href, '_blank'); return false;">contains a £ sign</a> but this one is allright.</p>
Note the litteral £-sign in the link and the encoded (expected) £ outside the link.