Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
4f34206a
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4f34206a
编写于
1月 21, 2018
作者:
J
Jacopo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allows html in commits atom feed
Html code now works in commits atom feed `title` and `summary`.
上级
269594bf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
3 deletion
+14
-3
app/views/projects/commits/_commit.atom.builder
app/views/projects/commits/_commit.atom.builder
+2
-2
changelogs/unreleased/41208-commit-atom-feeds-double-escaped.yml
...ogs/unreleased/41208-commit-atom-feeds-double-escaped.yml
+5
-0
spec/controllers/projects/commits_controller_spec.rb
spec/controllers/projects/commits_controller_spec.rb
+7
-1
未找到文件。
app/views/projects/commits/_commit.atom.builder
浏览文件 @
4f34206a
xml.entry do
xml.id project_commit_url(@project, id: commit.id)
xml.link href: project_commit_url(@project, id: commit.id)
xml.title truncate(commit.title, length: 80)
xml.title truncate(commit.title, length: 80
, escape: false
)
xml.updated commit.committed_date.xmlschema
xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(commit.author_email))
...
...
@@ -10,5 +10,5 @@ xml.entry do
xml.email commit.author_email
end
xml.summary markdown(commit.description, pipeline: :single_line)
xml.summary markdown(commit.description, pipeline: :single_line)
, type: 'html'
end
changelogs/unreleased/41208-commit-atom-feeds-double-escaped.yml
0 → 100644
浏览文件 @
4f34206a
---
title
:
Allows html text in commits atom feed
merge_request
:
16603
author
:
Jacopo Beschi @jacopo-beschi
type
:
fixed
spec/controllers/projects/commits_controller_spec.rb
浏览文件 @
4f34206a
...
...
@@ -41,15 +41,21 @@ describe Projects::CommitsController do
context
"when the ref name ends in .atom"
do
context
"when the ref does not exist with the suffix"
do
it
"renders as atom"
do
before
do
get
(
:show
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
"master.atom"
)
end
it
"renders as atom"
do
expect
(
response
).
to
be_success
expect
(
response
.
content_type
).
to
eq
(
'application/atom+xml'
)
end
it
'renders summary with type=html'
do
expect
(
response
.
body
).
to
include
(
'<summary type="html">'
)
end
end
context
"when the ref exists with the suffix"
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录