WordPress.org

Ready to get started?Download WordPress

Forums

Crayon Syntax Highlighter
Conflict with wp-admin protected using ,htaccess (2 posts)

  1. tecnotronico
    Member
    Posted 1 year ago #

    THIS IS A CORRECTED POST:

    Fellows,

    I stated to use crayon but got the following issue:

    My wp-admin directory is protected with .htaccess to avoid hackers attacks.

    The issue is that crayon is adding the following code in my pages:

    CODE START--------------

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    /* <![CDATA[ */
    var CrayonSyntaxSettings = {"is_admin":"","ajaxurl":"http:\/\/www.sysadmin.com.ve\/wp-admin\/admin-ajax.php","prefix":"crayon-","setting":"crayon-setting","selected":"crayon-setting-selected","changed":"crayon-setting-changed","special":"crayon-setting-special","orig_value":"data-orig-value"};
    /* ]]> */

    CODE END--------------

    So, each time a page is loaded, it shows the .htaccess login/pw window since it tries to access the wp-admin directory.

    How could I avoid it from crayon??

    Thanks in advance for your support on this matter.

    Dan

  2. akarmenia
    Member
    Plugin Author

    Posted 1 year ago #

    This guy seems to have figured it out: http://www.zapadlo.de/2012/crayon-syntax-highlighter-und-htaccess/

    I've removed CrayonSyntaxSettings.ajaxurl and I'm using ajaxurl, which is a window variable provided by wp. In any case, it'll still need to visit that url form the front end. This is much better than passing around and sanitising the wp-admin url with GET :P

    I'm post an update in a tick!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.