CGI::escaping for proper, good juju activity streams
This commit is contained in:
parent
b6754d92b7
commit
d5edc9b477
4 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -42,3 +42,4 @@ bin/*
|
||||||
nbproject
|
nbproject
|
||||||
patches-*
|
patches-*
|
||||||
capybara-*.html
|
capybara-*.html
|
||||||
|
dump.rdb
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ class StatusMessage < Post
|
||||||
def to_activity
|
def to_activity
|
||||||
<<-XML
|
<<-XML
|
||||||
<entry>
|
<entry>
|
||||||
<title>#{self.message}</title>
|
<title>#{CGI::escape(self.message)}</title>
|
||||||
<link rel="alternate" type="text/html" href="#{person.url}status_messages/#{self.id}"/>
|
<link rel="alternate" type="text/html" href="#{person.url}status_messages/#{self.id}"/>
|
||||||
<id>#{person.url}status_messages/#{self.id}</id>
|
<id>#{person.url}status_messages/#{self.id}</id>
|
||||||
<published>#{self.created_at.xmlschema}</published>
|
<published>#{self.created_at.xmlschema}</published>
|
||||||
|
|
|
||||||
BIN
dump.rdb
BIN
dump.rdb
Binary file not shown.
|
|
@ -33,7 +33,7 @@ module Diaspora
|
||||||
<subtitle>Posts from Diaspora</subtitle>
|
<subtitle>Posts from Diaspora</subtitle>
|
||||||
<updated>#{Time.now.xmlschema}</updated>
|
<updated>#{Time.now.xmlschema}</updated>
|
||||||
<author>
|
<author>
|
||||||
<name>#{@user.name}</name>
|
<name>#{CGI::escape(@user.name)}</name>
|
||||||
<uri>#{@user.public_url}</uri>
|
<uri>#{@user.public_url}</uri>
|
||||||
</author>
|
</author>
|
||||||
XML
|
XML
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue