WordPress.org

Ready to get started?Download WordPress

Forums

User Access Manager
[patch] HTML character entry for alternate post/page content (3 posts)

  1. Eric McNiece
    Member
    Posted 9 months ago #

    It is possible to fix the addslashes() problem present when entering escapable characters in the alternate post and page content areas within the UAM settings page. To do so, 4 locations must be modified (as of v1.2.4.3):

    • /user-access-manager/class/UserAccessManager.class.php: Line 1438
    • /user-access-manager/class/UserAccessManager.class.php: Line 1441
    • /user-access-manager/tpl/adminSettings.php: Line 141
    • /user-access-manager/tpl/adminSettings.php: Line 262

    UserAccessManager.class.php deals with the theme-side output of the HTML content, while adminSettings.php prints the admin settings page. Both locations must be adjusted to remove slashes so that you can save AND display your content properly.

    1. UserAccessManager.class.php:1438 before:
    $sUamPostContent = $oPost->post_content[0] . " " . $sUamPostContent;

    after:
    $sUamPostContent = $oPost->post_content[0] . " " . stripslashes($sUamPostContent);

    2. UserAccessManager.class.php:1441 before:
    $oPost->post_content = $sUamPostContent;

    after:
    $oPost->post_content = stripslashes($sUamPostContent);

    3. adminSettings.php:141 before:
    echo apply_filters('format_to_edit', ($aUamOptions['post_content']);

    after:
    echo apply_filters('format_to_edit', stripslashes($aUamOptions['post_content']) );

    4. adminSettings.php:262 before:
    echo apply_filters('format_to_edit', $aUamOptions['page_content']);

    after:
    echo apply_filters('format_to_edit', stripslashes($aUamOptions['page_content']) );

    These changes have been made to the following files so that you can copy-paste or completely replace your files if needed:

    The following support queue issues are related:

    And of course, special thanks to user gabrielinux and his post for actually tracking down part of the issue.

    Good luck! @GM_Alex... thanks for patching this when you get a chance ;)

    EDIT: I now realize that there may be more locations in which the HTML might be outputting to the theme... need to confirm.

    http://wordpress.org/plugins/user-access-manager/

  2. Eric McNiece
    Member
    Posted 6 months ago #

    @GM_Alex - any chance we can get a timeline for a fix for this? Low-hanging fruit for at least 7 support forum issues...

  3. Eric McNiece
    Member
    Posted 6 months ago #

    For Version: 1.2.5.0:

    • /user-access-manager/class/UserAccessManager.class.php: Line 1533
    • /user-access-manager/class/UserAccessManager.class.php: Line 1536
    • /user-access-manager/tpl/adminSettings.php: Line 141
    • /user-access-manager/tpl/adminSettings.php: Line 262

    Files:

Reply

You must log in to post.

About this Plugin

About this Topic

Tags