Ben Boeckel and Rémy Coutable
e919b5a4e9
Fix relative links in other markup formats
...
- Apply the RelativeLinkFilter filter to other formats, e.g.,
reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline
Fixes #3533 .
2016-02-12 17:20:59 +01:00
Robert Speicher
89b3ddd609
Allow limited Markdown in Broadcast Messages
...
Closes #11853
2016-02-06 14:30:07 -05:00
Robert Speicher
47982e50c4
Make Pipelines responsible for defining their custom whitelist
...
This allows for future pipelines to more easily define a custom
whitelist.
2016-02-03 17:24:08 -05:00
Benedict Etzel
6435f78a8c
Whitelist raw "abbr" elements when parsing Markdown
...
Closes #12517
2016-01-23 20:38:06 +01:00
Stan Hu
a10ab94b06
Gracefully handle invalid UTF-8 sequences in Markdown links
...
Closes #6077
2016-01-20 07:07:53 -08:00
Robert Speicher
65eae647a6
Merge branch 'backport-ee' into 'master'
...
Backport two commits from EE
Backport part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/110
See merge request !2424
2016-01-14 18:39:49 +00:00
Douglas Barbosa Alexandre
ac2c86055e
Update documentation on Banzai::Filter::GollumTagsFilter
2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre
765a2c7327
Refactoring Banzai::Filter::GollumTagsFilter
2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre
ca87bb652a
Remove GollumTagsPipeline
2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre
4872b319c8
Use the WikiPipeline when rendering the wiki markdown content
2016-01-14 12:09:31 -02:00
Douglas Barbosa Alexandre
a6a5990ee5
Add Banzai::Filter::GollumTagsFilter for parsing Gollum's tags in HTML
2016-01-14 12:09:31 -02:00
Douwe Maan
2a20c0e590
Prevent circular reference error in Banzai
2016-01-14 11:30:28 +01:00
Jason Lee
41bcab118a
Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;
2016-01-12 18:19:55 +08:00
Robert Speicher
b1539116f6
Merge branch 'task-list-class' into 'master'
...
Properly set task-list class on single item task lists
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4193
See merge request !2330
2016-01-07 20:10:07 +00:00
Robert Speicher
90510f0037
Merge branch 'milestone-ref' into 'master'
...
Link to milestone in "Milestone changed" system note
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4141
See merge request !2203
2016-01-07 19:22:43 +00:00
Douwe Maan
c3865bda02
Properly set task-list class on single item task lists
2016-01-07 15:52:34 +01:00
Douwe Maan
6865d3e500
Merge branch 'rs-issue-1697' into 'master'
...
Define a limited set of filters for SingleLinePipeline
Removes the following filters from its parent GfmPipeline:
- SyntaxHighlightFilter
- UploadLinkFilter
- TableOfContentsFilter
- LabelReferenceFilter
- TaskListFilter
Closes #1697
See merge request !2257
2016-01-06 18:31:28 +00:00
Douwe Maan
cf19efec3a
Revert "Temporarily disable Markdown caching"
...
This reverts commit d337d5e713 .
2016-01-06 13:26:02 +01:00
Douwe Maan
b9ed3961b5
Revert "Add DEBUG_BANZAI_CACHE env var to debug Banzai cache issue."
...
This reverts commit 4b027bc93a .
2016-01-06 13:25:13 +01:00
Robert Speicher
1e6fc0c6a4
Define a limited set of filters for SingleLinePipeline
...
Removes the following filters from its parent GfmPipeline:
- SyntaxHighlightFilter
- UploadLinkFilter
- TableOfContentsFilter
- LabelReferenceFilter
- TaskListFilter
Closes #1697
2016-01-05 17:13:21 -05:00
Douwe Maan
0b66151632
Remove icon from milestone reference.
2016-01-05 16:45:53 +01:00
Douwe Maan
fd91b48f24
Merge branch 'master' into milestone-ref
2016-01-05 16:40:23 +01:00
Douwe Maan
a7c424515c
Merge branch 'rs-relative-links-to-root' into 'master'
...
Support a single directory traversal in RelativeLinkFilter
Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md ` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md ` which omits the
`master` ref, resulting in a 404.
Fixes https://gitlab.com/gitlab-org/release-tools/issues/3
See merge request !2247
2016-01-05 13:32:25 +00:00
Douwe Maan
4b027bc93a
Add DEBUG_BANZAI_CACHE env var to debug Banzai cache issue.
2016-01-04 14:30:30 +01:00
Yorick Peterse
054df415f9
Optimize CSS expressions produced by Nokogiri
...
Nokogiri produces inefficient XPath expressions when given CSS
expressions such as "a.gfm". Luckily these expressions can be optimized
quite easily while still achieving the same results.
In the two cases where this optimization is applied the run time has
been reduced from around 170 ms to around 15 ms.
2015-12-31 15:46:47 +01:00
Yorick Peterse
d3951dfaa1
Don't use delegate to delegate trivial methods
...
Around 300 ms (in total) would be spent in these delegated methods due
to the extra stuff ActiveSupport adds to the compiled methods. Because
these delegations are so simple we can just manually define the methods,
saving around 275 milliseconds.
2015-12-31 15:46:47 +01:00
Yorick Peterse
3077cb52d9
Use XPath for searching link nodes
...
This is a tad faster than letting Nokogiri figure out whether it should
evaluate the query as CSS or XPath and then actually evaluating it.
2015-12-31 15:46:47 +01:00
Robert Speicher
d9d2e8a3e8
Support a single directory traversal in RelativeLinkFilter
...
Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md ` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md ` which omits the
`master` ref, resulting in a 404.
2015-12-30 15:36:59 -05:00
Robert Speicher
a97a2d2720
Merge branch 'mention-all' into 'master'
...
Only allow group/project members to mention `@all`
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473
See merge request !2205
2015-12-27 21:09:16 +00:00
Douwe Maan
7dedd997b9
Merge branch 'master' into milestone-ref
2015-12-25 13:16:33 +01:00
Douwe Maan
37993d3957
Escape all the things.
2015-12-24 21:36:33 +01:00
Douwe Maan
32543f3bd9
More escaping!
2015-12-24 21:19:03 +01:00
Douwe Maan
672cbbff95
Only allow group/project members to mention @all
2015-12-24 15:33:51 +01:00
Douwe Maan
989131c530
Render milestone links as references
2015-12-24 14:43:07 +01:00
Douwe Maan
331154ffdf
Escape reference link text
2015-12-24 14:38:23 +01:00
Drew Blessing
f177aaa5fa
Backport JIRA service
2015-12-18 14:19:48 -06:00
Douwe Maan
d337d5e713
Temporarily disable Markdown caching
2015-12-16 18:50:06 +01:00
Dmitriy Zaporozhets
40104746d6
Merge remote-tracking branch 'origin/feature/update-rubocop'
2015-12-16 13:44:50 +01:00
Douwe Maan
6560d053ed
Use lazy reference extractor to get issue's MRs
2015-12-15 16:57:11 +01:00
Douwe Maan
7781bda9bd
Move Markdown/reference logic from Gitlab::Markdown to Banzai
2015-12-15 15:51:16 +01:00