summaryrefslogtreecommitdiff
path: root/lib/banzai
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'extract-ee-specific-banzai-filters' into 'master'Robert Speicher2018-07-173-10/+28
|\ | | | | | | | | Extract EE-specific lines from Banzai pipelines See merge request gitlab-org/gitlab-ce!20636
| * Extract EE-specific lines from Banzai pipelinesextract-ee-specific-banzai-filtersSean McGivern2018-07-133-10/+28
| |
* | Merge branch 'satishperala/gitlab-ce-20720_webhooks_full_image_url' into ↵Douwe Maan2018-07-171-21/+1
|\ \ | |/ |/| | | | | | | | | | | | | 'master' Include full image URL in webhooks for uploaded images Closes #20720 See merge request gitlab-org/gitlab-ce!18109
| * Merge branch 'master' into satishperala/gitlab-ce-20720_webhooks_full_image_urlSean McGivern2018-07-067-28/+23
| |\
| * | Add documentation and specs for webhook URL rewritingSean McGivern2018-07-061-21/+1
| | |
* | | Updates from `rubocop -a`Lin Jen-Shin2018-07-091-1/+1
| | |
* | | Improve render performance of large wiki pagesPeter Leitzen2018-07-071-3/+8
| |/ |/| | | | | | | | | Compile often used regexps only once outside of the loop. This commit improves the performance of large wiki pages with many, many references.
* | Merge branch 'pravi/gitlab-ce-update-html-pipeline' into 'master'Douwe Maan2018-07-041-12/+5
|\ \ | | | | | | | | | | | | | | | | | | update html-pipeline 2.7.1 -> 2.8 Closes #48571 See merge request gitlab-org/gitlab-ce!20348
| * | Use strong_memoize to customize the SanitizationFilter whitelistRobert Speicher2018-07-031-12/+5
| | | | | | | | | | | | I never liked the hacky `customized?` method anyway, so this is cleaner.
| * | dup whitelist before modificationPirate Praveen2018-06-301-1/+1
| | | | | | | | | | | | Fixes ActionView::Template::Error (can't modify frozen Hash) #48415
* | | Merge branch '44994-osw-use-monospaced-font-on-diffs-commit-ref' into 'master'Robert Speicher2018-07-032-3/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Render SHA in merge request commit reference with mono spaced font" Closes #44994 See merge request gitlab-org/gitlab-ce!20228
| * | | Use monospaced font for MR diff commit link ref on GFMOswaldo Ferreira2018-06-272-3/+10
| | | |
* | | | Remove outdated comment from emoji_filter.rbDouwe Maan2018-07-021-4/+0
| |/ / |/| |
* | | Remove unused asset host logic from GfmPipeline and EmojiFilter specDouwe Maan2018-06-291-5/+1
|/ /
* | Fix performance bottleneck when rendering large wiki pagesSean McGivern2018-06-261-2/+4
| | | | | | | | | | | | | | `Nokogiri::XML::Node#ancestors` appears to be much slower than `HTML::Pipeline::Filter#has_ancestor?` for these purposes. We already use `#has_ancestor?` elsewhere, so this change also makes this filter more consistent with other banzai filters.
* | Merge branch 'security-2682-fix-xss-for-markdown-toc' into 'master'Alessio Caiazza2018-06-251-1/+1
|\ \ | | | | | | | | | | | | [master] Fix xss for Markdown elements where [[_TOC_]] is enabled See merge request gitlab/gitlabhq!2400
| * | Fix xss for Markdown elements where [[_TOC_]] is enabledMark Chao2018-06-161-1/+1
| | |
* | | Merge branch 'security-fj-bumping-sanitize-gem' into 'master'Alessio Caiazza2018-06-251-1/+2
|\ \ \ | |_|/ |/| | | | | | | | [master] Update sanitize gem to 4.6.5 to fix HTML injection vulnerability See merge request gitlab/gitlabhq!2399
| * | Whitelist text-align property for th and tdDouwe Maan2018-06-181-1/+2
| | |
* | | Allow trailing whitespace on blockquote fence linesDouwe Maan2018-06-181-6/+6
|/ /
* | Rails5 fix passing Group objects array into for_projects_and_groups ↵Jasper Maes2018-06-141-1/+1
|/ | | | milestone scope
* enable CommonMark as the defaultBrett Walker2018-06-141-1/+1
|
* Fix Banzai reference for milestones belonging to parent groupsMario de la Ossa2018-06-121-1/+1
|
* Eager load project routes for issue referencesYorick Peterse2018-05-281-1/+2
| | | | | This reduces the number of queries necessary when displaying the activity page of a group.
* Use ApplicationSetting.current_without_cache instead of ↵Rémy Coutable2018-05-231-1/+1
| | | | | | ApplicationSetting.current where applicable Signed-off-by: Rémy Coutable <remy@rymai.me>
* Fix double brackets being linkified in wiki markdownAlex2018-05-181-0/+3
|
* Resolve "Expand API: Render an arbitrary Markdown document"blackst0ne2018-05-182-3/+3
|
* Fix commit trailer rendering when Gravatar is disabledDouwe Maan2018-04-251-1/+0
|
* make call to 'html_escape' unambiguousBrett Walker2018-04-172-2/+2
|
* Fix reference filters in group contextJan Provaznik2018-04-127-16/+28
| | | | | | | | | Since !18150 abstract reference filter supports also `group` as a resource parent (not only `project`). Some reference filters, which inherit from abstract filter, depend on parent being `project` when checking a reference. This patch adds explicit check of parent class to the given filters.
* Support Markdown rendering using multiple projectsrendering-markdown-multiple-projectsYorick Peterse2018-04-1111-48/+123
| | | | | | | | | | | | | | | | | | | This refactors the Markdown pipeline so it supports the rendering of multiple documents that may belong to different projects. An example of where this happens is when displaying the event feed of a group. In this case we retrieve events for all projects in the group. Previously we would group events per project and render these chunks separately, but this would result in many SQL queries being executed. By extending the Markdown pipeline to support this out of the box we can drastically reduce the number of SQL queries. To achieve this we introduce a new object to the pipeline: Banzai::RenderContext. This object simply wraps two other objects: an optional Project instance, and an optional User instance. On its own this wouldn't be very helpful, but a RenderContext can also be used to associate HTML documents with specific Project instances. This work is done in Banzai::ObjectRenderer and allows us to reuse as many queries (and results) as possible.
* Merge branch '17939-osw-patch-support-gfm' into 'master'Sean McGivern2018-04-061-0/+4
|\ | | | | | | | | | | | | Add support for patch link extension for commit links on GFM Closes #17939 See merge request gitlab-org/gitlab-ce!18229
| * Add support for patch link extension for commit links on GFMOswaldo Ferreira2018-04-061-0/+4
| |
* | Better group support notes-related codeJan Provaznik2018-04-053-20/+51
|/ | | | | | | Updates notes-related services and rendering so this code can be easily used for group-scoped resources (specifically Epics). Related to gitlab-ee!5205
* Merge branch 'osw-41401-render-mr-commit-sha-instead-diffs' into 'master'Sean McGivern2018-04-045-5/+44
|\ | | | | | | | | Render MR commit SHA instead "diffs" when viable on GFM See merge request gitlab-org/gitlab-ce!18141
| * Render MR commit SHA instead "diffs" when viableosw-41401-render-mr-commit-sha-instead-diffsOswaldo Ferreira2018-04-045-5/+44
| |
* | Allow assigning and filtering issuables by ancestor group labelsFelipe Artur2018-04-041-1/+1
| |
* | Add banzai filter to detect commit message trailers and properly link the usersOmar Mekky2018-04-042-0/+163
| |
* | Bump html-pipeline to 2.7.1blackst0ne-bump-html-pipeline-gemblackst0ne2018-04-023-3/+3
| |
* | Fix auto-linking with escaped HTML entitiesSean McGivern2018-03-281-2/+6
| | | | | | | | | | | | We displayed the correct text as the link text (without double-encoding), but didn't do the same for the actual link target, so any link containing an ampersand would break when auto-linked.
* | Add ?, !, and : to trailing puncutation excluded from auto-linkingSean McGivern2018-03-231-5/+6
| |
* | Fix issuable state indicatorJan Provaznik2018-03-231-1/+9
|/ | | | | | | | | | | Now the issuable reference check works only in project scope, if we reference an issuable from a non-project resource (e.g. epics), then project is not set, and there is mismatch in generated issue references. This patch enables issuable reference state check also from group scope. Closes gitlab-ee#4683 Related to #30916
* move render_gfm into behaviors directoryMike Greiling2018-03-191-2/+2
|
* Manually escape '#' when building relative uris, fixes #42459Jan2018-03-111-1/+1
|
* Merge branch 'replace_redcarpet_with_cmark' into 'master'Sean McGivern2018-03-077-35/+133
|\ | | | | | | | | Add CommonMark markdown engine See merge request gitlab-org/gitlab-ce!14835
| * Add CommonMark markdown enginereplace_redcarpet_with_cmarkblackst0ne2018-03-077-35/+133
| |
* | Add Gitaly N+1 notice for Banzai filteringAlejandro Rodríguez2018-03-051-1/+2
| |
* | Merge branch '41719-mr-title-fix' into 'master'Douwe Maan2018-03-051-46/+40
|\ \ | |/ |/| | | | | | | | | Render htmlentities correctly for links not supported by Rinku Closes #41719 See merge request gitlab-org/gitlab-ce!17180
| * Match Rinku's behaviour for closing punctuation in links41719-mr-title-fixSean McGivern2018-03-021-15/+35
| | | | | | | | | | | | | | | | | | | | Rinku 2.0.0 (the version we use) will remove the last character of a link if it's a closing part of a punctuation pair (different types of parentheses and quotes), unless both of the below are true: 1. The matching pair has different start and end characters. 2. There are equal numbers of both in the matched string (they don't have to be balanced).
| * Render htmlentities correctly for links not supported by RinkuJarka Kadlecová2018-02-211-31/+5
| |