Commit Graph
28 Commits
Author SHA1 Message Date
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 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
Douwe Maan c3865bda02 Properly set task-list class on single item task lists 2016-01-07 15:52:34 +01: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
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
Dmitriy Zaporozhets 40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00