WordPress.org

Ready to get started?Download WordPress

Forums

My hyperlinks are "Escaping" (29 posts)

  1. ShimonSandler
    Member
    Posted 8 years ago #

    My entire blog entries are being escaped.

    Please take a look at the hyperlinks in my blog posts...they weren't like that last night. http://www.shimonsandler.com

    I'm freaked. Does anybody have an idea what could possibly be wrong? It looks like they're being escaped.

    Is there a way to change everything back to normal?

  2. ShimonSandler
    Member
    Posted 8 years ago #

    Oh, and another piece of information.
    I looked in my link-manager.php, and found:

    $link_url = stripslashes($_GET["linkurl"]);
    $link_name = stripslashes($_GET["name"])

  3. maerk
    Member
    Posted 8 years ago #

    Don't modify the stripslashes lines, they're there for security. Also, link-manager.php is to do with the links that you can add to wordpress to go in your sidebar, for instance, they're nothing to do with links in your posts or comments

    It looks like every special character is being escaped -- all the attribute values, ampersands in character references, etc.

    Did you recently make any changes to any WP files, or install any plugins?

  4. ShimonSandler
    Member
    Posted 8 years ago #

    No, that's the strang thing. I did save a post for editing that contained some backslashes. I don't know if that would've done it.

    Here is part of what I saved:
    So, for example, if there was a user "shimon" on a linux server running apache, and my home directory was /home/shimon/ and my web home was /home/shimon/httpd/ Then, Apache would automatically make my home directory accessible via the web at http://www.domain.com/~shimon/ I’m sure you know this already.

  5. ShimonSandler
    Member
    Posted 8 years ago #

    After I saved the post, is when I noticed the hyperlinks "escaping". Any ideas on how to fix this problem would be greatly appreciated.

  6. Varsity
    Member
    Posted 8 years ago #

    I started to get this problem just now, when I first edited a comment after upgrading to WP 2.0.3. Might it be a plugin? I can't think of anything I'm running that might do it...

    Oh yeah, and I'm also getting a 'Are you sure you want to do this?' page every time I make an edit now, which doesn't seem like something WP would do.

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Something appears to have gone through your posts and escaped every quote or double quote character. That would be what's mucking up your hyperlinks. But as to what escaped those quotes, I have no idea.

  8. ShimonSandler
    Member
    Posted 8 years ago #

    Everything was fine yesterday. And, I haven't added any plug-ins for at least a month or two.

    Help.

  9. Varsity
    Member
    Posted 8 years ago #

    My plugins:

    • Bad Behavior
    • Enforce www. Preference
    • Gravatar
    • Get Custom Field Values
    • Not-To-Me
    • Next-Previous Post URL
    • Ping/Track/Comment Count
    • Quote Comment
    • WordPress Database Backup

    I've disabled Bad Behaviour to no avail, and really can't see what else might be doing it in that list. It's never been a problem before now.

    I'm hosted on Dreamhost and my domain is registered with GoDaddy.

    (I think someone needs to sort list padding out)

  10. maerk
    Member
    Posted 8 years ago #

    It's affecting all wordpress output -- posts and comment -- but not the stuff in sidebar. This is quite strange, maybe ask your hosts to see if they've changed the PHP installation recently.

    What might be happening is that WP is using a less sophisticated escaping function based on your server settings. Sometimes web applications will do that so that they can offer security on all kinds of platforms.

    But WP default behaviour is much more subtle than just sticking a slash before every special character, so this is really very strange.

    Are you sure you've not changed anything -- added a new theme, or changed a file somwhere?

  11. ShimonSandler
    Member
    Posted 8 years ago #

    No new themes or changed files in at least a month or two. I'll contact my webhost.

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Check the content in the database as well. Maybe the actual data has changed somehow, and WP isn't adding these after the fact, but something added them to the data itself.

  13. ShimonSandler
    Member
    Posted 8 years ago #

    Does anyone else have a possible solution? I'm being hosted on a Windows box. Would migrating to a unix box be the solution?

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 8 years ago #

    Use the backup plugin and export your database to a file. Then look and see if the slashes are in the data itself.

  15. Varsity
    Member
    Posted 8 years ago #

    They are in the data for me.

    And I just noticed that rel="nofollow" is also being added with each edit too.

  16. ShimonSandler
    Member
    Posted 8 years ago #

    My webhost tried restoring the database. Here is the response I received:

    "Shimon, we restored your database from the 30th and everything was in the same condition. We went through the admin config and check all the settings and everything looks ok.

    Your original database has been put back. I would recommend getting on the forums for the portal software to find the fix for this problem."

    Any help will be greatly appreciated.

  17. ShimonSandler
    Member
    Posted 8 years ago #

    My webhost tried restoring the database. Here is the response I received:

    "Shimon, we restored your database from the 30th and everything was in the same condition. We went through the admin config and check all the settings and everything looks ok.

    Your original database has been put back. I would recommend getting on the forums for the portal software to find the fix for this problem."

    Any help will be greatly appreciated.

  18. Doodlebee
    Member
    Posted 8 years ago #

    Have you looked at your PHP info page to see how the server is set up to handle quotes? It's really easy to do - open up Notepad and type in the following:

    <?php phpinfo(); ?>

    and save it as "phpinfo.php" Upload to your server and open it up in your browser. There are three settings for "magic_quotes" - they should be turned off.

  19. ShimonSandler
    Member
    Posted 8 years ago #

    Okay, I'll try it.

    1) Where do I find the php info page? Is that what it's called?

    2) Where do I insert that code?

  20. maerk
    Member
    Posted 8 years ago #

    Just insert that code into a blank file, and save it with a filename of whatever you like, but it must have a .php extension.

    Probably best to put in your root folder, because then all you have to do is go to yourdomain.com/phpinfo.php

  21. ShimonSandler
    Member
    Posted 8 years ago #

    Great. I did it.
    How do I turn off the three settings for "magic_quotes" ?

  22. Varsity
    Member
    Posted 8 years ago #

    magic_quotes_gpc is on for me, but the other two are not. Otherwise, I've got the same question as Shimon.

  23. maerk
    Member
    Posted 8 years ago #

    I'm not an expert, but in the interest of getting a speedy reply to you, I know you can do it with a file called php.ini, or you can use .htaccess (I think).

    You could google for "configuring PHP with php.ini" or ".htaccess" to see what turns up.

    php.ini is also used by your host, and you can't change their copy, but I think you can put it in your root folder. It's something to check anyway :)

  24. Doodlebee
    Member
    Posted 8 years ago #

    To use .htaccess to turn off magic quote, just add this line to your .htaccess file:

    php_flag magic_quotes_gpc off

    Maerk is correct, though - otherwise, you'll need to ask your webhost provider to turn off magic quotes for you.

  25. Varsity
    Member
    Posted 8 years ago #

    I added it, but it hasn't done much yet. The flag is still raised.

  26. Varsity
    Member
    Posted 8 years ago #

    OK, this is my problem. How should I go about using that script?

  27. Varsity
    Member
    Posted 8 years ago #

    I've disabled the variable, but the problem is still there!

  28. Varsity
    Member
    Posted 8 years ago #

  29. maerk
    Member
    Posted 8 years ago #

    Congratulations!

Topic Closed

This topic has been closed to new replies.

About this Topic