diff options
author | Christian Walther <cwalther@gmx.ch> | 2015-02-21 22:12:13 +0100 |
---|---|---|
committer | Christian Walther <cwalther@gmx.ch> | 2015-03-16 22:05:52 +0100 |
commit | 90aa870c3607c170091b6034c0150f119697b0b9 (patch) | |
tree | 471bf470ce926c33557110a37f9ee5036df20af0 /app/views/events | |
parent | 71e146999c405ab301cd3c3e3aa03b89d46c461e (diff) | |
download | gitlab-ce-90aa870c3607c170091b6034c0150f119697b0b9.tar.gz |
Fix invalid Atom feeds when using emoji, horizontal rules, or images.
Fixes issues #880, #723, #1113: Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like <img> and <hr>, generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images, are not terminated and make the Atom XML invalid.
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/_event_issue.atom.haml | 2 | ||||
-rw-r--r-- | app/views/events/_event_merge_request.atom.haml | 2 | ||||
-rw-r--r-- | app/views/events/_event_note.atom.haml | 2 | ||||
-rw-r--r-- | app/views/events/_event_push.atom.haml | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/views/events/_event_issue.atom.haml b/app/views/events/_event_issue.atom.haml index eba2b63797a..0edb61ea246 100644 --- a/app/views/events/_event_issue.atom.haml +++ b/app/views/events/_event_issue.atom.haml @@ -1,3 +1,3 @@ %div{xmlns: "http://www.w3.org/1999/xhtml"} - if issue.description.present? - = markdown issue.description + = markdown(issue.description, xhtml: true) diff --git a/app/views/events/_event_merge_request.atom.haml b/app/views/events/_event_merge_request.atom.haml index 0aea2d17d65..1a8b62abeab 100644 --- a/app/views/events/_event_merge_request.atom.haml +++ b/app/views/events/_event_merge_request.atom.haml @@ -1,3 +1,3 @@ %div{xmlns: "http://www.w3.org/1999/xhtml"} - if merge_request.description.present? - = markdown merge_request.description + = markdown(merge_request.description, xhtml: true) diff --git a/app/views/events/_event_note.atom.haml b/app/views/events/_event_note.atom.haml index be0e05481ed..b49c331ccf2 100644 --- a/app/views/events/_event_note.atom.haml +++ b/app/views/events/_event_note.atom.haml @@ -1,2 +1,2 @@ %div{xmlns: "http://www.w3.org/1999/xhtml"} - = markdown note.note + = markdown(note.note, xhtml: true) diff --git a/app/views/events/_event_push.atom.haml b/app/views/events/_event_push.atom.haml index 2b63519edac..2fb9f7ec246 100644 --- a/app/views/events/_event_push.atom.haml +++ b/app/views/events/_event_push.atom.haml @@ -6,7 +6,7 @@ %i at = commit[:timestamp].to_time.to_s(:short) - %blockquote= markdown(escape_once(commit[:message])) + %blockquote= markdown(escape_once(commit[:message]), xhtml: true) - if event.commits_count > 15 %p %i |