Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • Jason Hill Friend
    #182421

    I must be missing something simple but I am having a problem with Joomla 3 automatically escaping all quotation marks.

    If I create a custom HTMl module and try throw some html in there, upon saving, slashes are added to escape all quotation marks. I have no WYSIWYG editors enabled and I have disabled all text filtering.

    I have done some pretty extensive googling and wasn’t able to find anything that helped.

    Thanks in advance.

    Ninja Lead Moderator
    #473769

    I could not reproduce the error, please send me the screenshot here for further investigation

    Jason Hill Friend
    #473914

    1. before_save
    2. after_save
    Ninja Lead Moderator
    #473915

    Ok I got it, please refer to my post at : http://www.joomlart.com/forums/topic/i-can-not-show-images-2/

    Hope it helps to solve the problem

    Jason Hill Friend
    #473927

    Thanks for the quick reply. Unfortunately It didn’t seem to help. According to the Joomla system information–>PHP Information magic_quotes_gpc is enabled? Any other ideas ?

    Jason Hill Friend
    #473937

    I think what you meant to post in the other thread is that magic_quotes needs to be OFF. Not ‘enabled’;.

    I fixed the issue by adding a php.ini file to both joomla root and joomla admin root. With the line listed below.
    magic_quotes_gpc = Off

    I then added the code below to the htaccess file.

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/myusername/public_html/yourJ3folder
    <Files php.ini>
    order allow,deny
    deny from all
    </Files>
    </IfModule>

    Change “myusername” and “yourJ3folder” to your respective folders.

    Hope this helps someone else.

    Ninja Lead Moderator
    #474019

    You have some case to fix the problem on your site.
    Disabling magic quotes server side
    + An example that sets the value of these directives to Off in php.ini

    ; Magic quotes
    ;

    ; Magic quotes for incoming GET/POST/Cookie data.
    magic_quotes_gpc = Off

    ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
    magic_quotes_runtime = Off

    ; Use Sybase-style magic quotes (escape ' with '' instead of ').
    magic_quotes_sybase = Off

    + If access to the server configuration is unavailable, use of .htaccess is also an option

    php_flag magic_quotes_gpc Off
    In the interest of writing portable code (code that works in any environment), like if setting at the server level is not possible, here’s an example to disable magic_quotes_gpc at runtime

    <?php
    if (get_magic_quotes_gpc()) {
    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    while (list($key, $val) = each($process)) {
    foreach ($val as $k => $v) {
    unset($process[$key][$k]);
    if (is_array($v)) {
    $process[$key] = $v;
    $process[] = &$process[$key];
    } else {
    $process[$key] = stripslashes($v);
    }
    }
    }
    unset($process);
    }
    ?>

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 2 voices, and was last updated by  Ninja Lead 11 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum