• Resolved thanatica2

    (@thanatica2)


    Why is three dots (…) automagically converted into a triple-dot character (…)? I don’t want that, so how can I disable it?

    If it’s to save space, it doesn’t actually, unless WP would serve up pages as UTF-8, but it doesn’t. “…” becomes “&# 8230;” (without the space) which is more than double.

Viewing 6 replies - 1 through 6 (of 6 total)
  • esmi

    (@esmi)

    Three dots is called an ellipsis. &# 8230; is the character encoding for an ellipsis.

    Thread Starter thanatica2

    (@thanatica2)

    Alright, cool, so how do I disable it?

    esmi

    (@esmi)

    Try adding:

    function remove_dots($more) {
    	return '';
    }
    add_filter('excerpt_more', 'remove_dots');

    to your theme’s functions.php file.

    Thread Starter thanatica2

    (@thanatica2)

    Sorry that doesn’t do it. I think you misunderstood me by thinking I meant the ellipsis at the end of an excerpt.

    I was talking about three dots anywhere in a page/post, written with the default editor (no matter if using HTML or wysiwyg). So when displaying the page or post normally (not as excerpt), three dots, anywhere in the content, are convert to an ellipsis.

    That’s the one I’d love to have disabled ??

    esmi

    (@esmi)

    I’ve not tried this at all but:

    function my_replace_ellipsis($content) {
    	str_replace('…', '…', $content); // replace ... with hellip
        return $content;
    }
    add_filter('the_content', 'my_replace_ellipsis');

    might work.

    Thread Starter thanatica2

    (@thanatica2)

    Yes, that would work. But it’s highly superfluous, because wordpress is doing its best to make “nice” characters (and there are a lot more than ellipses) and I’m undoing all that. Seems like a lot of wasted CPU cycles for absolutely nothing.

    I dug in the code a little bit, and soom found out that wptexturize is responsible for replace a whole buttload of characters and expressions by prettier things. Yes, prettier, but *not* what I type. I want to have control.

    So my search went on to find out why it was being called at all, because it isn’t. Not for content anyway. Seems that wordpress abuses php’s functionality of calling functions by name rather than reference, for plugin-ish functionality. Really oldskool.

    Anyway, in the end, this fixes things:
    remove_filter('the_content', 'wptexturize');

    And presto. Normal characters again.

    (Actually there are a LOT of filters for which wptexturize is added, but I won’t sum them all up, they’re in default-filters.php)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Triple dot conversion’ is closed to new replies.