From 6ada32ba4060f9dff0ed0a4c07ed97b9ac7b5a1c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 19 Oct 2023 13:39:09 -0700 Subject: [PATCH 1/2] Update issue templates --- .github/ISSUE_TEMPLATE/bug-report.md | 48 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 17 ++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..087f016 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,48 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +- [ ] If you used a custom Builder configuration, please supply it here + + ```rust + Builder::default() + .link_rel(None) + .url_relative(UrlRelative::PassThrough) + ``` + + - [ ] Please supply a reduced version of the *input* HTML that you used with Ammonia + + ```html + fill in here + ``` + + - [ ] If ammonia produced unexpected HTML + + - [ ] Try opening the *input* HTML directly in a WHATWG web browser (like Safari, Edge, Chrome, or Firefox) without sanitizing it. + + If the browser parses it the same way Ammonia does, then it's not a bug. + + - [ ] Supply the reduced *output* HTML here + + ```html + output here + ``` + + - [ ] If Ammonia panics, please provide a backtrace + + ```text + $ RUST_BACKTRACE=1 ./test + thread 'main' panicked at test.rs:1:17: + explicit panic + stack backtrace: + 0: std::panicking::begin_panic + 1: test::other_fn + 2: test::main + 3: core::ops::function::FnOnce::call_once + note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. + ``` diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..18d53ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. From acf46dd6d92228a9f1cb0eb92d8637e941ef694a Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 19 Oct 2023 16:40:32 -0700 Subject: [PATCH 2/2] Bump MSRV --- .github/workflows/main.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d759f8..e9c179d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - rust: ["1.60.0", "stable", "beta"] + rust: ["1.66.0", "stable", "beta"] build_flags: ["", "--cfg ammonia_unstable"] os: [ubuntu-latest] steps: diff --git a/README.md b/README.md index 3e6c359..d8e1853 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ HTML Sanitization ================= [![Crates.IO](https://img.shields.io/crates/v/ammonia.svg)](https://crates.rs/crates/ammonia) -![Requires rustc 1.60.0](https://img.shields.io/badge/rustc-1.60.0+-green.svg) +![Requires rustc 1.60.0](https://img.shields.io/badge/rustc-1.66.0+-green.svg) Ammonia is a whitelist-based HTML sanitization library. It is designed to prevent cross-site scripting, layout breaking, and clickjacking caused