|
From: Lo?c C. <lo...@us...> - 2001-04-27 18:28:55
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv31386/chat/lib
Modified Files:
common.lib.php3
Log Message:
Special characters don't need to be backslashed with HTML!
Index: common.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/common.lib.php3,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** common.lib.php3 2001/04/20 21:17:09 1.8
--- common.lib.php3 2001/04/27 18:28:53 1.9
***************
*** 23,27 ****
// | configuration directives |
// | - pmcHttpHeaders() = sends HTTP headers |
! // | - pmcSlashSingleQuotes() = slashes single quotes in a string |
// | - pmcSpecialChars() = converts all applicable characters to HTML |
// | entities, depending on the charset used |
--- 23,27 ----
// | configuration directives |
// | - pmcHttpHeaders() = sends HTTP headers |
! // | - pmcSlashSingleQuotes() = backslashes single quotes in a string |
// | - pmcSpecialChars() = converts all applicable characters to HTML |
// | entities, depending on the charset used |
***************
*** 381,403 ****
return str_replace('\'', $replaceBy, $str);
} // end of the 'pmcSlashSingleQuotes()' function
-
- /**
- * Add backslashes before double quotes in a string (used for html forms
- * fields)
- *
- * @param string string to slash
- * @param integer number of slashes to add before a double quote
- *
- * @return string slashed string
- *
- * @access public
- */
- function pmcSlashDoubleQuotes($str = '', $runTimes = 1)
- {
- $replaceBy = '\\"';
- for ($i = 1; $i < $runTimes; $i++)
- $replaceBy = '\\' . $replaceBy;
- return str_replace('"', $replaceBy, $str);
- } // end of the 'pmcSlashDoubleQuotes()' function
?>
--- 381,384 ----
|