Support » Fixing WordPress » WP changes X to multiplication symbol!

  • My domain is (4×4 Philippines) and WordPress automatically changes the ‘x’ to the multiplication symbol:

    Everything was OK at first but now that I need to redirect some of my pages to some of my subdomains ( the redirect won’t work because WP reads the domain as 4×

    How can I fix this? I’m using EasyRedirect by

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Huh. That one rarely comes up.

    Edit wp-includes/formatting.php.

    In the wptexturize function, at about line 23, you’ll find these two lines:

    $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
    $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1', '$1×$2');

    The very last section in each one is what is doing the replacing you are describing. Change them to these to eliminate that:

    $dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/');
    $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2', '$1“$2', '”$1', '’$1');

    All I did was to remove the last entry in each array. Remove those and you’re good.

    Hi Otto,

    I did what you said. I copy-pasted the code you posted but I’m still having the same problem. I have already cleared my cache but the problem still persists.

    EDIT — Correction: the problem became bigger. I’m now getting a Parse Error:

    Parse error: syntax error, unexpected T_LNUMBER in /*/*/*/*/wp-includes/formatting.php on line 98

    (replaced path with *) So I reverted back to the original. Then I also tried just replacing the offending characted with the regular x and I still get the same Parse Error message, same line (98).

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    I copy-pasted the code you posted

    Well, don’t do that. Edit the code yourself, like I explained in the text above.

    Copy and pasting code is not guaranteed to work in this case. This is because of the amp characters.

    Just edit those lines in a normal text editor (Notepad will work) and remove the bits I mentioned.

    Specifically, remove:
    , '/(\d+)x(\d+)/'

    , '$1& #215;$2'

    OK, I edited the code by hand. I made sure I only deleted the code BEFORE the ) until the last , but I still get the same Parse Error when I try to go to other pages.

    But there’s no error when I view the posts.

    EDIT — yes, that’s what I removed, exactly those characters.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    I still get the same Parse Error

    Well, you’re not editing anything anywhere near line 98, so that doesn’t make any sense.

    Start with a fresh unedited copy of the file. Download the again if you have to.

    Use a very basic text editor. Notepad. TextPad. Not Word or anything else. Other editors can do things that basic simple text editors do not.

    Other than that, I don’t know what to tell you. The instructions I gave work. I tested it just now.

    Thanks, Otto.

    I’ll try again. I used Dreamweaver in code view to do the edits.

    When I open it in Notepad it isn’t “formatted” correctly. I’ll try to download a simple text editor and use that then I’ll update this thread.

    Weird. It’s still giving me the same problem and error…

    As stated in the first post one of the main problems I’m encountering with this replacing of characters is my redirection plugin. Since the code replaces the small X I tried using the capital X for the plugin tag. Good thing domain names are case-insensitive so it worked, but seeing the times symbol in my domain within my posts and/or pages is irritating.

    It could also confuse new-comers to the site…


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    I edited this file perfectly in Notepad, so I don’t understand what you mean by “not formatted correctly”.

    The solution is very simple and I’ve done it myself to prove that it works. I don’t know what kind of problems you’re having or why you’re getting that error, but I really can’t make it any simpler.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP changes X to multiplication symbol!’ is closed to new replies.