Commit graph

25 commits

Author SHA1 Message Date
Brett Walker
40983f4a9c
Show tooltip for malicious looking links
Such as those with IDN homographs or embedded
right-to-left (RTLO) characters.

Autolinked hrefs should be escaped
2019-01-31 16:52:20 +01:00
Brett Walker
7bc0fbe22f Fix review comments
including refactoring, disabling sourcepos for pipelines that
don't need it, and minimizing spec changes by disabling
sourcepos when not testing for it explicitly.
2019-01-21 15:07:40 -06:00
Brett Walker
45a04f9374 Enable CommonMark source line position information
This adds 'data-sourcepos' to tags, indicating which
line of markdown it came from.  Sets the stage for
intelligently manipulating specific lines of markdown.
2019-01-21 13:45:16 -06:00
Brett Walker
7e900ed856 Refactoring and addressing review comments
and additional spec
2019-01-17 09:33:18 -06:00
Cindy Pallares
b5b475c273
Merge branch 'security-xss-in-markdown-following-unrecognized-html-element' into 'master'
[master] XSS in markdown following unrecognized HTML element

Closes #2732

See merge request gitlab/gitlabhq!2599
2018-11-28 19:09:35 -05:00
Brett Walker
1d4785470d Resolve "Process urls with spaces in all markdown processing" 2018-09-08 04:21:30 +00:00
Brett Walker
644296d67b Resolve "Wiki page attachments not rendered properly" 2018-09-07 14:27:44 +00:00
Brett Walker
e41b999432 test that wiki links with spaces works in wiki pipeline 2018-09-05 09:19:16 -05:00
Bob Van Landuyt
b4c4b48a8c Allow users to set a status
This can be done trough the API for the current user, or on the
profile page.
2018-07-30 15:01:26 +02:00
Robert Speicher
6a97759ea8 Remove ImageLazyLoadFilter from EmailPipeline 2017-09-12 11:54:14 -04:00
Robert Speicher
72a7b30c9f Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
Jarka Kadlecova
7bee7b848a Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
Douwe Maan
fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Adam Niedzielski
9da3076944 Improve support for external issue references 2017-06-30 14:47:53 +02:00
panjan
6b4c6fa193 Fix Markdown styling inside reference links
Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/18096
2016-11-01 09:49:30 +00:00
Ebrahim Byagowi
7e3ff18523 Add RTL support to markdown renderer 2016-10-16 17:47:48 +03:30
Qingping Hou
5c9376f90d Fix URLs with anchors in wiki 2016-09-13 23:53:40 -07:00
Grzegorz Bizon
9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Paco Guzman
be98ee2586
Fixing specs stubbed objects cannot access database 2016-06-10 15:41:56 +02:00
Timothy Andrew
8e71c19a69 Implement the correct linking behaviour in WikiLinkFilter.
Original Comments
=================

- Linking behaves as per rules documented here:
  https://gitlab.com/gitlab-org/gitlab-ce/blob/16568-document-wiki-linking-behavior/doc/markdown/wiki.md
- All links (to other wiki pages) are rewritten to be at the level of
  the app root. We can't use links relative to the current
  page ('./foo', 'foo', '../foo'), because they won't work in the
  markdown preview, where the current page is suffixed with `/edit`
- Move existing `WikiLinkFilter` specs to `WikiPipeline` spec. It makes
  sense to run these tests on the combined output of the pipeline,
  rather than a single filter, since we can catch issues with
  conflicting filters.
- Add more tests to cover the new linking

@rymai's Review
===============

- Classes nested under `WikiLinkFilter` should declare `WikiLinkFilter`'s
  inherit, so nothing changes if the nested class is loaded first.
- Add a blank line after a guard clause
- Use keyword arguments for the `Rewriter` constructor
- Invert a condition - use `if` instead of `unless`
- Inline a `let` in `WikiPipeline` spec - it was only used in a single place
- Change out of date spec names
- Add a comment for every rewrite rule in `Rewriter`
2016-06-09 10:04:15 +05:30
Gabriel Mazetto
1575a95b65 little refactor and improvements on specs 2016-04-06 20:09:15 -03:00
Gabriel Mazetto
61fe0a2397 Fixed WikiPipeline and specs 2016-04-06 03:12:39 -03:00
Robert Speicher
def6446dad Replace [[_TOC_]] tag even if toc result is blank 2016-03-03 12:41:40 -05:00
Robert Speicher
82bc6c6229 Add a spec for WikiPipeline
Removes the specs from GollumTagsFilter that were more like integration
tests for the pipeline than unit tests of the filter.
2016-03-01 16:59:56 -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