summaryrefslogtreecommitdiff
path: root/lib/banzai/filter
Commit message (Collapse)AuthorAgeFilesLines
* Fix milestone references with HTML entities in the namefix-milestone-references-with-escaped-html-entitiesSean McGivern2019-05-243-10/+10
| | | | | | | | | When a milestone name contained an HTML entity that would be escaped (&, <, >), then it wasn't possible to refer to this milestone by name, or use it in a quick action. This already worked for labels, but not for milestones. We take care to re-escape un-matched milestones, too.
* Merge branch 'patch-49' into 'master'Sean McGivern2019-05-061-0/+1
|\ | | | | | | | | | | | | No leading/trailing spaces when generating heading ids (Fixes #57528) Closes #57528 See merge request gitlab-org/gitlab-ce!27025
| * Use strip to remove leading/trailing spacesWillian Balmant2019-04-111-2/+1
| | | | | | Change based on comments in MR #27025
| * No leading/trailing spaces when generating heading ids (Fixes #57528)Willian Balmant2019-04-101-2/+2
| | | | | | Update based on comments in MR #27025
| * No leading/trailing spaces when generating heading ids (Fixes #57528)Willian Balmant2019-04-041-0/+2
| |
* | Run rubocop -a on CE filessh-upgrade-rubocop-0.68.0-ceStan Hu2019-05-054-4/+4
| |
* | Move scoped_label into label presenterJan Provaznik2019-04-231-2/+4
| | | | | | | | | | | | | | When rendering a label we want to check 'scoped_label' feature availability on a project/group where label is being used. For this reason a label presenter is used in UI and information about context project/group is passed to this presenter.
* | Remove multi-line suggestions feature flagosw-remote-multi-line-suggestions-ffOswaldo Ferreira2019-04-101-12/+0
| | | | | | | | That's a straightforward feature flag code removal for 11.10
* | Update comments about N + 1 Gitaly callsZeger-Jan van de Weg2019-04-091-1/+1
| | | | | | | | | | To make sure all known issues are linked to the correct epic, I've gone through the code base, and updated the comments where required.
* | Merge branch 'keyval-labels' into 'master'Sean McGivern2019-04-052-4/+14
|\ \ | | | | | | | | | | | | [CE] Add mutually exclusive labels See merge request gitlab-org/gitlab-ce!26804
| * | [backend] backport of scoped labelsJan Provaznik2019-04-042-4/+14
| |/ | | | | | | Scoped labels in EE require additional changes in CE code.
* | Fenced blockquotes to not change source line pos58717-checkbox-cannot-be-checked-if-a-blockquote-is-aboveBrett Walker2019-04-041-1/+3
|/ | | | | Replaces blockquote fences with \n, keeping the line numbering intact.
* Merge branch '54916-extended-tooltip-for-merge-request-links' into 'master'Phil Hughes2019-03-262-6/+17
|\ | | | | | | | | | | | | Resolve "Extended tooltip for merge request links" Closes #54916 See merge request gitlab-org/gitlab-ce!25221
| * Add merge request popover with detailsSam Bigelow2019-03-212-6/+17
| | | | | | | | | | | | | | | | | | - Show pipeline status, title, MR Status and project path - Popover attached to gitlab flavored markdown everywhere, including: + MR/Issue Title + MR/Issue description + MR/Issue comments + Rendered markdown files
* | Implement multi-line suggestions filteringOswaldo Ferreira2019-03-204-6/+49
|/ | | | | Implements the filtering logic for `suggestion:-x+y` syntax.
* Only allow 30 RPCs per test case to GitalyZeger-Jan van de Weg2019-02-221-1/+4
| | | | | | | | | Prior to this change, 35 Gitaly RPCs were allowed. But recently there's been a renewed interest in performance. By lowering the number of calls new N + 1's will pop up. Later commits will add blocks to ignore the raised errors, followed by an issue for each to be fixed.
* Properly handle multiple refs to same footnoteBrett Walker2019-02-131-7/+16
|
* Merge branch 'jprovazn-remove-redcarpet' into 'master'Grzegorz Bizon2019-02-053-37/+0
|\ | | | | | | | | | | | | Remove Redcarpet markdown engine Closes #51374 See merge request gitlab-org/gitlab-ce!24819
| * Remove Redcarpet markdown engineJan Provaznik2019-02-043-37/+0
| | | | | | | | | | This engine was replaced with CommonMarker in 11.4, it was deprecated since then.
* | Catch possible Addressable::URI::InvalidURIErrorBrett Walker2019-02-041-1/+5
|/
* Show tooltip for malicious looking linksBrett Walker2019-01-312-11/+87
| | | | | | | Such as those with IDN homographs or embedded right-to-left (RTLO) characters. Autolinked hrefs should be escaped
* Merge branch 'bw-enable-sourcepos' into 'master'Robert Speicher2019-01-285-5/+20
|\ | | | | | | | | Enable CommonMark source line position information See merge request gitlab-org/gitlab-ce!23971
| * Fix review commentsBrett Walker2019-01-212-2/+3
| | | | | | | | | | | | including refactoring, disabling sourcepos for pipelines that don't need it, and minimizing spec changes by disabling sourcepos when not testing for it explicitly.
| * Enable CommonMark source line position informationBrett Walker2019-01-215-5/+19
| | | | | | | | | | | | This adds 'data-sourcepos' to tags, indicating which line of markdown it came from. Sets the stage for intelligently manipulating specific lines of markdown.
* | Allow suggestions to be copied and pasted as GFMDouwe Maan2019-01-251-0/+1
| | | | | | | | | | Supports both suggestions transformed from GFM to HTML and from GFM to HTML to Vue component.
* | Merge branch 'db-copy-as-gfm-prosemirror' into 'master'Phil Hughes2019-01-2511-0/+16
|\ \ | | | | | | | | | | | | Reimplement Copy-as-GFM using the prosemirror document model See merge request gitlab-org/gitlab-ce!22797
| * | Use nodes and marks to power Copy-as-GFMdb-copy-as-gfm-prosemirrorDouwe Maan2019-01-2411-0/+16
| |/ | | | | | | | | The spec needed to be updated because in some cases the resulting Markdown is slightly different, though equally valid.
* | Fix 404s for snippet uploads when relative URL root usedStan Hu2019-01-221-0/+2
|/ | | | | | | | | Personal snippet uploads have neither a group nor a project. If a GitLab instance were configured with a relative URL root (e.g. `/gitlab`), then the Markdown filter would not include this root in the generated path. We fix this by adding this root if there is no group or project. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56280
* Merge branch '26375-markdown-footnotes-not-working' into 'master'Lin Jen-Shin2019-01-172-5/+92
|\ | | | | | | | | | | | | Markdown footnotes not working Closes #26375 See merge request gitlab-org/gitlab-ce!24168
| * Refactoring and addressing review commentsBrett Walker2019-01-172-16/+25
| | | | | | | | and additional spec
| * Updates based on review commentsBrett Walker2019-01-102-9/+9
| |
| * Properly process footnotes in markdownBrett Walker2019-01-082-2/+80
| | | | | | | | | | All the ids and classes were stripped. Add them back in and make ids unique
* | Fix MilestonesFinder to pass relations to scopeHeinrich Lee Yu2019-01-121-2/+2
|/ | | | | | | Instead of querying relations into ids we just pass them to the model scope because the scope supports it now. Also changes other calls to `Milestone.for_projects_and_groups`
* Merge branch 'security-label-xss' into 'master'John Jarvis2019-01-021-1/+5
|\ | | | | | | | | [master] Escape html entities when no label found See merge request gitlab/gitlabhq!2706
| * Escape html entities when no label foundJarka Košanová2018-12-121-1/+5
| |
* | Merge branch 'security-master-url-rel' into 'master'John Jarvis2019-01-021-6/+6
|\ \ | | | | | | | | | | | | [master] Set URL rel attribute for broken URLs See merge request gitlab/gitlabhq!2695
| * | Set URL rel attribute for broken URLsJan Provaznik2018-12-111-6/+6
| |/ | | | | | | | | | | It's possible that URI fails to parse a link, but browsers still recognize given URL as a link, we should make sure that 'rel' attribute is set also in this case.
* | Remove feature flag for suggest changes featureOswaldo Ferreira2018-12-181-1/+0
| |
* | Allow suggesting single line changes in diffsOswaldo Ferreira2018-12-132-1/+26
|/
* Resolve "Extended user centric tooltips"Tim Zallmann2018-12-081-1/+1
|
* Changed frontmatter filtering to support YAML, JSON, TOML, and arbitrary ↵Travis Miller2018-12-072-27/+34
| | | | languages
* [CE] - Add milestones autocomplete for epicsFelipe Artur2018-12-071-16/+50
| | | | CE backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8632
* Merge branch 'security-xss-in-markdown-following-unrecognized-html-element' ↵Cindy Pallares2018-11-281-0/+3
| | | | | | | | | into 'master' [master] XSS in markdown following unrecognized HTML element Closes #2732 See merge request gitlab/gitlabhq!2599
* Make sure there's only one slash as path separatorsh-53180-append-pathStan Hu2018-11-091-0/+1
| | | | | | | | | | In Ruby 2.4, `URI.join("http://test//", "a").to_s` will remove the double slash, however it's not the case in Ruby 2.5. Using chomp should work better for the intention, as we're not trying to allow things like ../ or / paths resolution. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53180
* Prepare Banzai to work with group issuablesce-7341-epics-extractorJarka Košanová2018-10-311-2/+9
|
* Enable more frozen string in lib/**/*.rbgfyoung2018-10-063-0/+6
| | | | | | | | | | | | | Enables frozen for the following: * lib/*.rb * lib/banzai/**/*.rb * lib/bitbucket/**/*.rb * lib/constraints/**/*.rb * lib/container_registry/**/*.rb * lib/declarative_policy/**/*.rb Partially addresses #47424.
* Merge branch 'mao/48221-issues_show_sql_count' into 'master'Sean McGivern2018-10-051-1/+1
|\ | | | | | | | | | | | | Banzai label ref finder - minimize SQL calls by sharing context more aggresively Closes #48221 See merge request gitlab-org/gitlab-ce!22070
| * Banzai project ref- share context more aggresivelyMario de la Ossa2018-10-041-1/+1
| | | | | | | | | | | | | | Changes `Banzai::CrossProjectReference#parent_from_ref` to return the project in the context if the project's `full_path` matches the ref we're looking for, as it makes no sense to go to the database to find a Project we already have loaded.
* | Support short reference to group entities from project entitiesce-7287-epic-referencesJarka Košanová2018-10-041-0/+6
|/ | | | | | - add a direct project parent (group) to Banzai context - if an epic is referenced from a direct descendant -> change epic to_reference to use short reference
* Prevent Error 500s with invalid relative linksStan Hu2018-09-291-1/+5
| | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/52009