Hello Jack
On 7/20/2022 9:14 PM, jack gleeson wrote:
> @@ -181,7 +186,7 @@ _sanitizer = bleach.sanitizer.Cleaner(> "q",> "h1", "h2", "h3", "h4", "h5", "h6",> "details", "summary",> - "abbr", "dfn",> + "abbr", "dfn", "del"> ],> attributes={**bleach.sanitizer.ALLOWED_ATTRIBUTES, **_sanitizer_attrs},> protocols=[
I am fine with the current solution, however I know some markdown
engines perform strikethroughs with the ~~ symbol. Thoughts?
On Thu Jul 21, 2022 at 11:12 PM CEST, Brett Gilio wrote:
> I am fine with the current solution, however I know some markdown > engines perform strikethroughs with the ~~ symbol. Thoughts?
We use CommonMark, so it would have to be standardized there first.
On 7/21/2022 4:13 PM, Drew DeVault wrote:
>> We use CommonMark, so it would have to be standardized there first.
In that case, I am totally fine with omitting <del> from the sanitizer.
This patch works with the ~~ notation and recognises it as
strikethrough.
Use of <del> in place of <s> was just personal preference, I'm agnostic
on which is more suitable.
I didn't realise CommonMark still hadn't agreed on including
strikethrough in the specification. I see the value in including them,
but recognise that it is not in the standard. In which case, it's fair
to call this out of scope and ddevault can ignore this patch.
On 7/21/2022 6:30 PM, Jack Gleeson wrote:
> This patch works with the ~~ notation and recognises it as strikethrough.>> Use of <del> in place of <s> was just personal preference, I'm agnostic> on which is more suitable.>> I didn't realise CommonMark still hadn't agreed on including> strikethrough in the specification. I see the value in including them,> but recognise that it is not in the standard. In which case, it's fair> to call this out of scope and ddevault can ignore this patch.>>>
I'm not seeing where in this patch it is recognizing the ~~ notation.
Regardless, Drew, would you be open to not sanitizing <del>?
>> I'm not seeing where in this patch it is recognizing the ~~ notation.
That's something built in to the mistletoe library.
It also includes support for tables - also not in CommonMark.
I'm just providing a function to render the existing strikethrough
tokens
as strikethroughs.
On 7/21/2022 6:38 PM, Jack Gleeson wrote:
>>>>> I'm not seeing where in this patch it is recognizing the ~~ notation.> That's something built in to the mistletoe library.> It also includes support for tables - also not in CommonMark.> I'm just providing a function to render the existing strikethrough tokens> as strikethroughs.>>
Understood, thank you.
On Fri Jul 22, 2022 at 1:38 AM CEST, Jack Gleeson wrote:
> >> I'm not seeing where in this patch it is recognizing the ~~ notation.>> That's something built in to the mistletoe library. It also includes> support for tables - also not in CommonMark. I'm just providing a> function to render the existing strikethrough tokens> as strikethroughs.
Ugh, that's annoying. The whole point of commonmark was to put a stop to
all of these private vendor extensions.
Since we stick to CommonMark, I would prefer to see this implemented by
users with <del> tags rather than ~~. Can you update this patch to only
add del to the whitelist?
On 7/22/2022 3:05 AM, Drew DeVault wrote:
> On Fri Jul 22, 2022 at 1:38 AM CEST, Jack Gleeson wrote:>>>> I'm not seeing where in this patch it is recognizing the ~~ notation.>> That's something built in to the mistletoe library. It also includes>> support for tables - also not in CommonMark. I'm just providing a>> function to render the existing strikethrough tokens>> as strikethroughs.> Ugh, that's annoying. The whole point of commonmark was to put a stop to> all of these private vendor extensions.
So, to clarify, is this patch dead?
On Fri Jul 22, 2022 at 7:34 PM CEST, Brett Gilio wrote:
> > Ugh, that's annoying. The whole point of commonmark was to put a stop to> > all of these private vendor extensions.> So, to clarify, is this patch dead?
No, I followed up on the patch asking for a different approach.
On Fri, Jul 22 2022 at 10:05:00 +0200, Drew DeVault <sir@cmpwn.com>
wrote:
> Ugh, that's annoying. The whole point of commonmark was to put a stop > to> all of these private vendor extensions
It makes sense when you think about markdown libraries
targeting things other than html. If you're targeting
Latex and other targets at once, it'd be nice to have
a common tag you can replace with the appropriate target
element.
If I had more of a horse in the race I'd reopen the 8
year old (!) discussion on including strikethrough in
the spec.