Does this filter *require* others?

Created on 2 October 2023, about 1 year ago
Updated 29 January 2024, 11 months ago

Problem/Motivation

When first setting up my input format, I created a brand new one with no other filters enabled. With them not enabled, I think the validator is assuming that the other ones appear first. But what if they don't appear at all?

Steps to reproduce

Create a new input format, and select only the Markdown Easy filter. Click save.

Proposed resolution

(a) Detect if there are no other filters selected, so this is irrelevant. or,
(b) change the error message to reflect that these other two filters are required for markdown_easy to work.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @chrisfromredfin
  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    Hey Chris,

    I decided to write the validator that way to **really** encourage folks to enable the "Limit HTML" and "Convert line breaks" filters in order for the default configuration to be more secure.

    There is info in the README and docs with details on how to disable the validation.

    Also - I just committed a change that creates a new "Markdown" text format (properly configured) when the module is enabled.

    So - bottom line is that the "Limit HTML" and "Convert line breaks" filters are not 100% percent required, but they are 100% strongly suggested.

    With this explanation, does the way I implemented the validation make (more) sense?

    -mike

  • πŸ‡ΊπŸ‡ΈUnited States chrisfromredfin Portland, Maine

    OK I just re-installed this just to take it for a spin. I think where I'm getting hung up is actually just the language. I would propose changing

    A simple Markdown filter. It is strongly recommended to configure the 'Limit allowed HTML tags and correct faulty HTML' filter so that it runs after this filter.

    When I read this, I hear "configure them (if you do) to run AFTER" - but I don't also read "and you SHOULD configure them."

    I think something like:

    A simple Markdown filter. You will need to configure the 'Limit allowed HTML tags and correct faulty HTML' filter, and it should run after this filter. See the README to disable this requirement.

    • ultimike β†’ committed 3404e0aa on 1.0.x
      Issue #3391119 by ultimike, chrisfromredfin: Does this filter *require*...
  • Status changed to Fixed 11 months ago
  • πŸ‡ΊπŸ‡ΈUnited States ultimike Florida, USA

    Chris - I understand what you're saying. I've updated the text format description (pretty close to) as you suggested.

    thanks,
    -mike

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024