summaryrefslogtreecommitdiff
path: root/lib/banzai
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch ↵Nick Thomas2018-08-231-2/+3
|\ | | | | | | | | | | | | | | | | '43096-controller-projects-issuescontroller-referenced_merge_requests-json-executes-more-than-100-sql-queries' into 'master' Resolve "Controller Projects::IssuesController#referenced_merge_requests.json executes more than 100 SQL queries" Closes #43096 See merge request gitlab-org/gitlab-ce!21237
| * Fix routes N+1 in Issues::ReferencedMergeRequestsService#executeSean McGivern2018-08-211-2/+3
| | | | | | | | | | Sorting here needs the project routes to be loaded, including the namespace routes.
* | Resolve "Wiki: links with spaces in the url render incorrectly with CommonMark"Brett Walker2018-08-212-0/+78
|/
* Add frozen_string_literal to recently-added files from the communitySean McGivern2018-08-102-0/+4
|
* Merge branch '28930-add-project-reference-filter' into 'master'Sean McGivern2018-08-103-0/+144
|\ | | | | | | | | | | | | Resolve "GFM : provide 'project' reference in comment" Closes #28930 See merge request gitlab-org/gitlab-ce!20285
| * Use a hash to memoize readable_project_ids with user objects as keysReuben Pereira2018-07-311-6/+5
| |
| * Remove nodes_visible_to_user from ProjectParser and memoize readable_project_idsReuben Pereira2018-07-151-17/+10
| |
| * Use map instead of collect in the ProjectParser#projects_readable_by_user ↵Reuben Pereira2018-07-051-1/+1
| | | | | | | | function
| * Add back the Project#to_reference_with_postfix function since it can be used ↵Reuben Pereira2018-07-051-1/+1
| | | | | | | | in the ProjectReferenceFilter#link_to_project function
| * Use a custom ProjectParser#nodes_visible_to_user function so that the user ↵Reuben Pereira2018-07-051-2/+21
| | | | | | | | permissions for all project references can be checked together
| * Correct the comment above the ProjectReferenceFilter.references_in method.Reuben Pereira2018-07-031-1/+1
| |
| * Eager load a project's route and its namespace with route in ↵Reuben Pereira2018-07-031-1/+1
| | | | | | | | project_reference_filter
| * Eager load the namespace and route of a project in project_reference_filter.rbReuben Pereira2018-07-031-1/+2
| |
| * Correct the comments above the ProjectReferenceFilter#project_link_filter ↵Reuben Pereira2018-07-031-2/+2
| | | | | | | | function to make it clear that the full project path is required in a reference.
| * Correct the misleading name of a variable in ↵Reuben Pereira2018-07-031-3/+3
| | | | | | | | ProjectReferenceFilter.project_link_filter
| * Correct the comment above the projects_hash function in the ↵Reuben Pereira2018-06-301-3/+3
| | | | | | | | project_reference_filter
| * A working implementation of a project reference filter which links project ↵Reuben Pereira2018-06-303-0/+132
| | | | | | | | references to project profile.
* | Allow users to set a statusBob Van Landuyt2018-07-301-0/+17
| | | | | | | | | | This can be done trough the API for the current user, or on the profile page.
* | Fix slow Markdown renderingStan Hu2018-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | The sanitize transformers were being duplicated each time the Markdown renderer was called, leading to expontential growth in rendering times. The problem was that although HTML::Pipeline::SanitizationFilter.WHITELIST is a frozen hash, the `:transformers` array can be modified. We need to do deep copy of this to avoid adding duplicates. Closes #49409
* | Merge branch 'sh-enable-frozen-literals-banzi-filters' into 'master'Rémy Coutable2018-07-233-3/+9
|\ \ | | | | | | | | | | | | Enable frozen strings in remaining lib/banzai/filter/*.rb files See merge request gitlab-org/gitlab-ce!20777
| * | Enable frozen strings in remaining lib/banzai/filter/*.rb filessh-enable-frozen-literals-banzi-filtersStan Hu2018-07-233-3/+9
| | | | | | | | | | | | | | | | | | | | | This also fixes a bug with the ImageLazyLoadFilter not doing the right thing when an existing class attribute is present. Part of #47424
* | | Enable frozen strings in lib/banzai/filter/*.rbsh-freeze-banzai-filter-stringsStan Hu2018-07-2338-0/+76
|/ / | | | | | | | | | | | | | | | | | | Excludes a few filters that require more work: * lib/banzai/filter/image_lazy_load_filter_spec.rb * lib/banzai/filter/syntax_highlight_filter_spec.rb * lib/banzai/filter/table_of_contents_filter_spec.rb Part of #47424
* | 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
|