"&" sucks
This commit is contained in:
@ -31,7 +31,7 @@ public class RSSRenderer extends HTMLRenderer {
|
|||||||
if ( (subject == null) || (subject.length() <= 0) )
|
if ( (subject == null) || (subject.length() <= 0) )
|
||||||
subject = "not specified";
|
subject = "not specified";
|
||||||
out.write(" <title>" + subject + "</title>\n");
|
out.write(" <title>" + subject + "</title>\n");
|
||||||
out.write(" <link>" + urlPrefix + sanitizeXML(BlogRenderer.getEntryURL(entry, info, true)) + "</link>\n");
|
out.write(" <link>" + urlPrefix + BlogRenderer.getEntryURL(entry, info, true) + "</link>\n");
|
||||||
out.write(" <guid isPermalink=\"false\">syndie://" + entry.getURI().toString() + "</guid>\n");
|
out.write(" <guid isPermalink=\"false\">syndie://" + entry.getURI().toString() + "</guid>\n");
|
||||||
out.write(" <pubDate>" + getRFC822Date(entry.getURI().getEntryId()) + "</pubDate>\n");
|
out.write(" <pubDate>" + getRFC822Date(entry.getURI().getEntryId()) + "</pubDate>\n");
|
||||||
PetName pn = user.getPetNameDB().getByLocation(entry.getURI().getKeyHash().toBase64());
|
PetName pn = user.getPetNameDB().getByLocation(entry.getURI().getKeyHash().toBase64());
|
||||||
@ -229,7 +229,9 @@ public class RSSRenderer extends HTMLRenderer {
|
|||||||
if (entry.getAttachments() != null) {
|
if (entry.getAttachments() != null) {
|
||||||
for (int i = 0; i < _entry.getAttachments().length; i++) {
|
for (int i = 0; i < _entry.getAttachments().length; i++) {
|
||||||
Attachment a = _entry.getAttachments()[i];
|
Attachment a = _entry.getAttachments()[i];
|
||||||
out.write(" <media:content url=\"" + urlPrefix + sanitizeXML(getAttachmentURL(i))
|
String url = urlPrefix + sanitizeXML(getAttachmentURL(i))
|
||||||
|
+ "#" + sanitizeTagParam(a.getName()); // tacked on for readability
|
||||||
|
out.write(" <media:content url=\"" + url
|
||||||
+ "\" fileSize=\"" + a.getDataLength()
|
+ "\" fileSize=\"" + a.getDataLength()
|
||||||
+ "\" type=\"" + sanitizeTagParam(a.getMimeType())
|
+ "\" type=\"" + sanitizeTagParam(a.getMimeType())
|
||||||
+ "\">");
|
+ "\">");
|
||||||
@ -238,7 +240,7 @@ public class RSSRenderer extends HTMLRenderer {
|
|||||||
out.write(" </media:content>\n");
|
out.write(" </media:content>\n");
|
||||||
|
|
||||||
if (included == 0) // plain RSS enclosures can only have one enclosure per entry, unlike Media RSS
|
if (included == 0) // plain RSS enclosures can only have one enclosure per entry, unlike Media RSS
|
||||||
out.write(" <enclosure url=\"" + urlPrefix + sanitizeXML(getAttachmentURL(i))
|
out.write(" <enclosure url=\"" + url
|
||||||
+ "\" length=\"" + a.getDataLength()
|
+ "\" length=\"" + a.getDataLength()
|
||||||
+ "\" type=\"" + sanitizeTagParam(a.getMimeType()) + "\" syndietype=\"attachment\" />\n");
|
+ "\" type=\"" + sanitizeTagParam(a.getMimeType()) + "\" syndietype=\"attachment\" />\n");
|
||||||
included++;
|
included++;
|
||||||
|
Reference in New Issue
Block a user