WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP-dTree] Foreign characters (4 posts)

  1. calebe
    Member
    Posted 5 years ago #

    Hello.

    First of all, I ought to say that wp-dTree is a great plugin. But, um, I can't get it to display foreign characters (namely the c-cedilla, "ç") in the widget. ("March" in portuguese is "Março".)

    I tried adding a line like this in dtree.php:

    str=str.replace(/\ç/g,'\ç');

    But to no effect. Any ideas?

  2. wenzlerm
    Member
    Posted 5 years ago #

    I have a similar problem. In archives the month March in a German run blog is displayed 'M& auml; z' instead of 'März'

    <a class="node" title="M&auml;rz" href="javascript: a.o(2);">M&auml;rz</a>

    Any ideas how to fix this?

  3. wenzlerm
    Member
    Posted 5 years ago #

    Problem found, its related to wp_dTree.prototype.htmlEntities in dtree.php Version 2.5 line 180

    wp_dTree.prototype.htmlEntities = function(str) {
            // FIX WENZLERM Archive Umlaute (März)
    	// str=str.replace(/\&/g,'\&amp;');
    	str=str.replace(/\"/g,'\&quot;');
    	str=str.replace(/\</g,'\<');
    	str=str.replace(/\>/g,'\>');
    	return str;
    }

    Seems that my &auml; gehts somehow translated to &amp;auml

    Escaping is probably necessary as in the function above, but here it is somehow called twice I guess...

    Have fun, Ben!

  4. ulfben
    Member
    Posted 5 years ago #

    That method is entirely redundant (there is PHP method for doing that work) and should've been replace outright. I'm surprised I didn't notice it was still left in. :)

    It'll be fixed in the next release.

Topic Closed

This topic has been closed to new replies.

About this Topic