• I have a link in one of my posts

    <a href="http://www.laserperformance.com/ukin/index.php?option=com_content&task=view&id=439&Itemid=298" target="_blank">a Laser 2000</a>

    to which wp-Typography insists upon adding an extra (non-hyperlinked) zero, so that it renders ‘a Laser 20000’

    I can’t see which of the features could be causing this, so is this a bug?

    Any ideas/help gratefully received.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same bug. When smart quotes are turned on then zero characters at html boundaries are duplicated. 8<sup>00</sup> on my page appears as 80<sup>00</sup>0

    There is a bug in php-typography.php file in lines 735 and 738.
    The intence in statement condition was “not empty string” but current condition for it is invalid. PHP treats string “0” as false, not true.

    you must replace the following statements (in lines 735 and 738)

    if($prevChr)
    if($nextChr)

    to

    if($prevChr!="")
    if($nextChr!="")

    Thank you for bringing this to my attention. I will release the fix shortly.

    The fix was included in version 1.14

    Thank you for the fix.
    I installed the plugin 3 days ago and found it very useful. I have one more suggestion (not critical). I noticed a lot of warnings in php error log:

    htmlspecialchars(): Invalid multibyte sequence in argument in …wp-content/plugins/wp-typography/php-typography/php-typography.php on line 555

    I identified a page which triggered this warning and corrected it, but anyway: if something on a page is wrong then utf-8 functions does not work so I’d suggest additional condition

    if (mb_check_encoding($unlockedText[“value”],”UTF-8″)) {

    for lines 554 and 555 (html_entity_decode and htmlspecialchars operations), maybe only htmlspecialchars (html_entity_decode did not generate any warning)

    @pik256

    Thank you for the suggestion. UTF-8 encoding is a disclosed requirement of the plugin.

    While skipping the htmlspecialchars() instruction for non UTF-8 encodings will avoid the warning, it will not fix the problem. The execution of this function is needed for the proper operation of the plugin. By not conditionally bypassing the function, at least a warning is generated to give the administrator notice there is a failed dependency.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp-Typography adding extra zero to link’ is closed to new replies.