[ruby] Update redcarpet: 3.5.1 → 3.6.0 (minor) (#19067)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com> Co-authored-by: Mac Siri <mac@forem.com>
This commit is contained in:
parent
0126948fc6
commit
59330184ac
4 changed files with 3 additions and 10 deletions
|
|
@ -664,7 +664,7 @@ GEM
|
|||
ffi (~> 1.0)
|
||||
recaptcha (5.12.3)
|
||||
json
|
||||
redcarpet (3.5.1)
|
||||
redcarpet (3.6.0)
|
||||
redis (4.7.1)
|
||||
redis-actionpack (5.3.0)
|
||||
actionpack (>= 5, < 8)
|
||||
|
|
|
|||
|
|
@ -38,13 +38,6 @@ RSpec.describe MarkdownProcessor::Parser, type: :service do
|
|||
expect(number_of_triple_backticks).to eq(2)
|
||||
end
|
||||
|
||||
# TODO: @zhao-andy this should fail if this issue is solved: https://github.com/forem/forem/issues/13823
|
||||
it "escapes triple backticks within a codeblock when using tildes" do
|
||||
code_block = "~~~\nhello\n```\nwhatever\n```\n~~~"
|
||||
number_of_triple_backticks = generate_and_parse_markdown(code_block).scan("```").count
|
||||
expect(number_of_triple_backticks).to eq(0)
|
||||
end
|
||||
|
||||
it "does not remove the non-'raw tag related' four dashes" do
|
||||
code_block = "```\n----\n```"
|
||||
expect(generate_and_parse_markdown(code_block)).to include("----")
|
||||
|
|
@ -274,7 +267,7 @@ RSpec.describe MarkdownProcessor::Parser, type: :service do
|
|||
context "when provided with an @username" do
|
||||
context "when html has injected styles" do
|
||||
before do
|
||||
create :user, username: "User1"
|
||||
create(:user, username: "User1")
|
||||
end
|
||||
|
||||
let(:suspicious) do
|
||||
|
|
@ -285,7 +278,7 @@ RSpec.describe MarkdownProcessor::Parser, type: :service do
|
|||
end
|
||||
|
||||
it "strips the styles as expected" do
|
||||
linked_user = %(<a class=\"mentioned-user\" href=\"http://localhost:3000/user1\">@user1</a>)
|
||||
linked_user = %(<a class="mentioned-user" href="http://localhost:3000/user1">@user1</a>)
|
||||
expected_result = <<~HTML.strip
|
||||
<p>x{animation:s}#{linked_user} s{}<br>
|
||||
<style>{transition:color 1s}:hover{color:red}</p>
|
||||
|
|
|
|||
BIN
vendor/cache/redcarpet-3.5.1.gem
vendored
BIN
vendor/cache/redcarpet-3.5.1.gem
vendored
Binary file not shown.
BIN
vendor/cache/redcarpet-3.6.0.gem
vendored
Normal file
BIN
vendor/cache/redcarpet-3.6.0.gem
vendored
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue