I tried to work with this issue. This can be done but issue is ForgeLinkTreeProcessor's articat linking also converts [ ] to links. How we can solve the issue
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't tried this myself, so I'm not sure what all the challenges will be exactly, but I looked into it a little bit right now. The ForgeLinkTreeProcessor code adds [ and ] around existing links like [SomeWikiPage], so shouldn't affect [ ] and only maybe [x] if there is a page called x. It could be customized to inspect the node properties & text more if needed to apply only in certain situations.
It looks like there is an extension for markdown to implement the checkbox idea, might be good to try using that rather than writing something from scratch: https://github.com/FND/markdown-checklist
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah agree. I think we can use custom regex for markdown.inlinepatterns.SHORT_REF_RE
I will give an update. Need to check how we can skip sanitize html part for
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes I think that would be ok if it is what's needed to make this feature work.
The various form fields were removed because if people type <input... or <button> into a comment they probably want it to show the tag, not show an actual form element. So it was to reduce confusion. But it could be ok for this (we could also maybe fine-tune the type of input tag later)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes I think that would be ok if it is what's needed to make this feature
work.
The various form fields were removed because if people type <input... or="" <button=""> into a comment they probably want it to show the tag, not show
an actual form element. So it was to reduce confusion. But it could be ok
for this (we could also maybe fine-tune the type of input tag later)
Status: open Milestone: unreleased Created: Thu May 19, 2016 08:58 PM UTC by Rohan Verma Last Updated: Sun Sep 02, 2018 06:22 AM UTC Owner: Rohan Verma
Hi
I tried to work with this issue. This can be done but issue is ForgeLinkTreeProcessor's articat linking also converts [ ] to links. How we can solve the issue
Hi Shalitha,
I haven't tried this myself, so I'm not sure what all the challenges will be exactly, but I looked into it a little bit right now. The ForgeLinkTreeProcessor code adds
[
and]
around existing links like[SomeWikiPage]
, so shouldn't affect[ ]
and only maybe[x]
if there is a page calledx
. It could be customized to inspect the node properties & text more if needed to apply only in certain situations.It looks like there is an extension for markdown to implement the checkbox idea, might be good to try using that rather than writing something from scratch: https://github.com/FND/markdown-checklist
Hi Dave
Yeah agree. I think we can use custom regex for markdown.inlinepatterns.SHORT_REF_RE
I will give an update. Need to check how we can skip sanitize html part for
Thanks
Hi..
Now checklist is working but when sanitization is disabled
I have added markdown checlist plugin to extensions
extensions=['fenced_code', 'codehilite',
ForgeExtension(
**kwargs), 'tables', 'toc', 'nl2br', 'markdown_checklist.extension'],
Used custom short reference regex
This will skip [ ] and [x]
But how we can deal with html sanitizer?
Update. All working well when we remove <input> element from sanitizer blacklist. Is it okay to allow input element to be rendered ?
Yes I think that would be ok if it is what's needed to make this feature work.
The various form fields were removed because if people type
<input...
or<button>
into a comment they probably want it to show the tag, not show an actual form element. So it was to reduce confusion. But it could be ok for this (we could also maybe fine-tune the type ofinput
tag later)Hi Dave
Great.. I will be sending a merge request soon
On Wed, 5 Sep 2018 1:02 am Dave Brondsema, dave@brondsema.net wrote:
Related
Tickets:
#8085Done in https://forge-allura.apache.org/p/allura/git/merge-requests/277/