*) HTML-Tags in headlines and author names were not filtered.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2061 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 19 years ago
parent 152745b145
commit 465319caf3

@ -7,7 +7,7 @@
// //
// This File is contributed by Jan Sandbrink // This File is contributed by Jan Sandbrink
// Contains contributions from Marc Nause [MN] // Contains contributions from Marc Nause [MN]
// last change: 03.04.2006 // last change: 06.05.2006
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@ -143,9 +143,9 @@ public class Blog {
if(hasRights) { if(hasRights) {
try { try {
prop.put("mode", 1); //edit prop.put("mode", 1); //edit
prop.put("mode_author", author); prop.put("mode_author", wikiCode.replaceHTML(author));
prop.put("mode_pageid", page.key()); prop.put("mode_pageid", page.key());
prop.put("mode_subject", page.subject()); prop.put("mode_subject", wikiCode.replaceHTML(page.subject()));
prop.put("mode_page-code", new String(page.page(), "UTF-8").replaceAll("<","&lt;").replaceAll(">","&gt;")); prop.put("mode_page-code", new String(page.page(), "UTF-8").replaceAll("<","&lt;").replaceAll(">","&gt;"));
} catch (UnsupportedEncodingException e) {} } catch (UnsupportedEncodingException e) {}
} }
@ -159,8 +159,8 @@ public class Blog {
wikiCode wikiTransformer=new wikiCode(switchboard); wikiCode wikiTransformer=new wikiCode(switchboard);
prop.put("mode", 2);//preview prop.put("mode", 2);//preview
prop.put("mode_pageid", pagename); prop.put("mode_pageid", pagename);
prop.put("mode_author", author); prop.put("mode_author", wikiCode.replaceHTML(author));
prop.put("mode_subject", post.get("subject","")); prop.put("mode_subject", wikiCode.replaceHTML(post.get("subject","")));
prop.put("mode_date", dateString(new Date())); prop.put("mode_date", dateString(new Date()));
prop.put("mode_page", wikiTransformer.transform(post.get("content", ""))); prop.put("mode_page", wikiTransformer.transform(post.get("content", "")));
prop.put("mode_page-code", post.get("content", "").replaceAll("<","&lt;").replaceAll(">","&gt;")); prop.put("mode_page-code", post.get("content", "").replaceAll("<","&lt;").replaceAll(">","&gt;"));
@ -171,8 +171,8 @@ public class Blog {
if(hasRights) { if(hasRights) {
prop.put("mode",4); prop.put("mode",4);
prop.put("mode_pageid",pagename); prop.put("mode_pageid",pagename);
prop.put("mode_author",page.author()); prop.put("mode_author",wikiCode.replaceHTML(page.author()));
prop.put("mode_subject",page.subject()); prop.put("mode_subject",wikiCode.replaceHTML(page.subject()));
} }
else prop.put("mode",3); //access denied (no rights) else prop.put("mode",3); //access denied (no rights)
} }
@ -198,8 +198,8 @@ public class Blog {
continue; continue;
entry = switchboard.blogDB.read(pageid); entry = switchboard.blogDB.read(pageid);
prop.put("mode_entries_"+count+"_pageid",entry.key()); prop.put("mode_entries_"+count+"_pageid",entry.key());
prop.put("mode_entries_"+count+"_subject", entry.subject()); prop.put("mode_entries_"+count+"_subject", wikiCode.replaceHTML(entry.subject()));
prop.put("mode_entries_"+count+"_author", entry.author()); prop.put("mode_entries_"+count+"_author", wikiCode.replaceHTML(entry.author()));
prop.put("mode_entries_"+count+"_date", dateString(entry.date())); prop.put("mode_entries_"+count+"_date", dateString(entry.date()));
prop.put("mode_entries_"+count+"_page", wikiTransformer.transform(entry.page())); prop.put("mode_entries_"+count+"_page", wikiTransformer.transform(entry.page()));
if(hasRights) { if(hasRights) {
@ -224,8 +224,8 @@ public class Blog {
//only show 1 entry //only show 1 entry
prop.put("mode_entries",1); prop.put("mode_entries",1);
prop.put("mode_entries_0_pageid", page.key()); prop.put("mode_entries_0_pageid", page.key());
prop.put("mode_entries_0_subject", page.subject()); prop.put("mode_entries_0_subject", wikiCode.replaceHTML(page.subject()));
prop.put("mode_entries_0_author", page.author()); prop.put("mode_entries_0_author", wikiCode.replaceHTML(page.author()));
prop.put("mode_entries_0_date", dateString(page.date())); prop.put("mode_entries_0_date", dateString(page.date()));
prop.put("mode_entries_0_page", wikiTransformer.transform(page.page())); prop.put("mode_entries_0_page", wikiTransformer.transform(page.page()));
if(hasRights) { if(hasRights) {

Loading…
Cancel
Save