Update of /cvsroot/webnotes/webnotes/core
In directory usw-pr-cvs1:/tmp/cvs-serv20913/core
Modified Files:
meta_inc.php note_api.php string_api.php
Log Message:
- Removed some hard-coded formatting from the theme, and moved it to the theme.css
- Removed some styles which were not needed.
- Used strict XHTML validator with the phpnet theme output and fixed all errors.
(there is only one remaining error in the sample files which uses border="0" for the source forge logo).
- Used htmlspecialchars() rather than string_disable_html() and used it for e-mail / note. This is to escape chars like <, >, and hence get no errors from the validator.
- Removed strings_disable_html()
- #<note id> will now work in the e-mail (title) field.
Index: meta_inc.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/meta_inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- meta_inc.php 10 Sep 2002 01:14:35 -0000 1.1
+++ meta_inc.php 26 Sep 2002 06:55:05 -0000 1.2
@@ -15,8 +15,8 @@
$g_content_expire = 0;
}
?>
-<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
-<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
-<META HTTP-EQUIV="Pragma-directive" CONTENT="no-cache">
-<META HTTP-EQUIV="Cache-Directive" CONTENT="no-cache">
-<META HTTP-EQUIV="Expires" CONTENT="<?php echo $g_content_expire ?>">
\ No newline at end of file
+<meta http-equiv="Pragma" content="no-cache" />
+<meta http-equiv="Cache-Control" content="no-cache" />
+<meta http-equiv="Pragma-directive" content="no-cache" />
+<meta http-equiv="Cache-Directive" content="no-cache" />
+<meta http-equiv="Expires" content="<?php echo $g_content_expire ?>" />
\ No newline at end of file
Index: note_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/note_api.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- note_api.php 26 Sep 2002 03:41:46 -0000 1.28
+++ note_api.php 26 Sep 2002 06:55:05 -0000 1.29
@@ -210,7 +210,7 @@
$info['visible'] = $v_visible;
$info['id'] = $v_id;
- $info['email'] = $v_email;
+ $info['email'] = string_prepare_note_for_viewing ( $v_email, $t_page_info['url'] );
$info['note'] = string_prepare_note_for_viewing ( $v_note, $t_page_info['url'] );
$info['date'] = $v_date_submitted;
Index: string_api.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/core/string_api.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- string_api.php 24 Sep 2002 06:14:40 -0000 1.6
+++ string_api.php 26 Sep 2002 06:55:05 -0000 1.7
@@ -63,19 +63,15 @@
return htmlspecialchars( addslashes( $p_string ) );
}
### --------------------
- function string_disable_html( $p_string ) {
- return str_replace(array('<', '>'), array('<', '>'), $p_string );
- }
- ### --------------------
function string_add_note_links( $p_page_url, $p_note ) {
return ( preg_replace( '/#([0-9]+)/', "<a href=\"$p_page_url#\\1\">#\\1</a>", $p_note ) );
}
### --------------------
function string_prepare_note_for_viewing( $p_note_string, $p_url = null ) {
if ( null !== $p_url ) {
- return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) ) );
+ return( string_add_note_links( $p_url, string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) ) );
} else {
- return( string_preserve_spaces_at_bol( string_disable_html( $p_note_string ) ) );
+ return( string_preserve_spaces_at_bol( htmlspecialchars( $p_note_string ) ) );
}
}
### --------------------
|