Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-7) was last changed on 21-Nov-2005 13:21 by GregorHagedorn  

This page was created on 23-Feb-2003 23:02 by SantiagoGala

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed 117 lines
!!!Proper HTML List nesting
The following patch makes <ul> and <ol> nest properly.
Without it, the [Test] pages has errors in the list section,
with it, just the <b> accross <p> ''intentional'' error.
Try it at [memojo.com|http://validator.w3.org/check?uri=http%3A%2F%2Fmemojo.com%2Fmemojowiki%2FWiki.jsp%3Fpage%3DTest].
__Note__ that the templates have further errors that make this page at JSPWiki not compliant.
--SantiagoGala
Of course, this is why we don't use the strict DTD, but the loose DTD :-).
--JanneJalkanen
I think I fount the biggest non-compliance issue lasting (even for Transitional DTD) is that
<NOSCRIPT> can only be used in <body>, which seems reasonable, since no user agent should
ever show head information. I have taken ages to notice! I just scraped the whole
head section from the templates in my tests. --Santiago
OK, this is probably true. It's just an old trick I scraped from somewhere, but we should probably get rid of it anyway.
--JanneJalkanen
{{{
Index: src/com/ecyrd/jspwiki/TranslatorReader.java
===================================================================
RCS file: /p/cvs/JSPWiki/src/com/ecyrd/jspwiki/TranslatorReader.java,v
retrieving revision 2.25
diff -i -u -r2.25 TranslatorReader.java
--- src/com/ecyrd/jspwiki/TranslatorReader.java 20 Feb 2003 21:32:18 -0000 2.25
+++ src/com/ecyrd/jspwiki/TranslatorReader.java 23 Feb 2003 20:58:46 -0000
@@ -1227,24 +1227,30 @@
{
StringBuffer buf = new StringBuffer();
- if( m_listlevel > 0 )
- {
- buf.append("</LI>\n");
- }
-
int numBullets = countChars( m_in, '*' ) + 1;
+ /* Opening a nested list */
if( numBullets > m_listlevel )
{
for( ; m_listlevel < numBullets; m_listlevel++ )
- buf.append("<UL>\n");
- }
+ {
+ /* Insert new list */
+ buf.append("<ul>\n");
+
+ }
+ } /* or closing a nested list */
else if( numBullets < m_listlevel )
{
for( ; m_listlevel > numBullets; m_listlevel-- )
- buf.append("</UL>\n");
+ buf.append("</li></ul>\n");
}
-
+ else if( m_listlevel > 0 )
+ {
+ /* Close current element */
+ buf.append("</li>\n");
+ }
+
+ /*Open a new element */
buf.append("<LI>");
return buf.toString();
@@ -1255,24 +1261,28 @@
{
StringBuffer buf = new StringBuffer();
- if( m_numlistlevel > 0 )
- {
- buf.append("</LI>\n");
- }
-
int numBullets = countChars( m_in, '#' ) + 1;
if( numBullets > m_numlistlevel )
{
for( ; m_numlistlevel < numBullets; m_numlistlevel++ )
- buf.append("<OL>\n");
- }
+ {
+ /* Insert new list */
+ buf.append("<ol>\n");
+ }
+ } /* or closing a nested list */
else if( numBullets < m_numlistlevel )
{
for( ; m_numlistlevel > numBullets; m_numlistlevel-- )
- buf.append("</OL>\n");
+ buf.append("</li></ol>\n");
}
-
+ else if( m_listlevel > 0 )
+ {
+ /* Close current element */
+ buf.append("</li>\n");
+ }
+
+ /*Open a new element */
buf.append("<LI>");
return buf.toString();
}}}
----
Back to [Category Patches]
Content now obsolete and wiped, please refer to earlier versions for history of topic.
Version Date Modified Size Author Changes ... Change note
7 21-Nov-2005 13:21 0.088 kB GregorHagedorn to previous
6 24-Feb-2003 19:01 3.542 kB JanneJalkanen to previous | to last
5 24-Feb-2003 17:47 3.398 kB SantiagoGala to previous | to last
4 24-Feb-2003 17:02 3.068 kB JanneJalkanen to previous | to last
3 23-Feb-2003 23:06 2.971 kB SantiagoGala to previous | to last
2 23-Feb-2003 23:03 2.785 kB SantiagoGala to previous | to last
1 23-Feb-2003 23:02 2.751 kB SantiagoGala to last
« This page (revision-7) was last changed on 21-Nov-2005 13:21 by GregorHagedorn