I have a problem with CKEditor. When I try to add a link with it
<a href="foo.html">foo</a>
it always replaces " with \"
<a href=\"foo.html\">foo</a>
This kind of notation seems like working when I print it on a page but if I e-mail it with a php script, gmail renders it like
<a>foo</a>
Can anyone have an idea about that?
Can I achieve this with config.js?
Note: This is not about the 开发者_高级运维mailer php script because I have tested it without CKEditor.
UPDATE: I have disabled the magic quotes in my php script and working properly.
to avoid disabling magic_quotes for example for a shared server i have used (caus i had a problem in mailto link converted to \ )
stripslashes($text)
or as i have found in php.net manual example #2
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][stripslashes($k)] = $v;
$process[] = &$process[$key][stripslashes($k)];
} else {
$process[$key][stripslashes($k)] = stripslashes($v);
}
}
}
unset($process);
}
精彩评论