The MU forums have moved to WordPress.org

Single quote in Site Name not working (5 posts)

  1. pcskibum
    Member
    Posted 14 years ago #

    I just started a clean install of WPMU 2.7.1. Everything seems to be working. But it looks like the code needs stripslashes() or something on the Site Name.

    In Site Admin/Options I try to make the Site Name Fred's Books but after saving the page it always displays as Fred\'s Books.

    Anywhere the Site Name appears, such as the footer on the home page, it also shows with the back slash. (This is happening with the default theme.)

    In Settings/General the Blog Title works properly with single quotes.

    Anyone know where I have to fix the code to remove the slash?

  2. tdjcbe
    Member
    Posted 14 years ago #

    There's already a ticket for the issue:

    http://trac.mu.wordpress.org/ticket/974

    Waiting on a fix.

  3. Person
    Member
    Posted 14 years ago #

    In wpmu-edit.php, change the following
    update_site_option( "site_name", $_POST['site_name'] );
    to:
    $sn = $_POST['site_name'];
    $sn = stripslashes($sn);
    update_site_option( "site_name", $sn );

    This will remove the backslash. (you can also nest it directly as update_site_option( "site_name", stripslashes($_POST['site_name']) ); )

  4. tdjcbe
    Member
    Posted 14 years ago #

    Person, thanks for that. It would be a plus if you updated that ticket and added in a has-patch tag to it so that Donncha can look at your solution.

  5. pixelnate
    Member
    Posted 14 years ago #

    Hate to dig up an old post, but this appears to be broken again in v.2.9.2. Can anybody else confirm this?

About this Topic

  • Started 14 years ago by pcskibum
  • Latest reply from pixelnate