"@babel/runtime": "^7.4.5",
"@clusterws/cws": "^0.14.0",
"array-includes": "^3.0.3",
- "autoprefixer": "^9.5.1",
+ "atrament": "^0.2.3",
+ "autoprefixer": "^9.6.0",
"axios": "^0.19.0",
"babel-loader": "^8.0.5",
"babel-plugin-lodash": "^3.3.4",
"escape-html": "^1.0.3",
"exif-js": "^2.3.0",
"express": "^4.17.1",
- "file-loader": "^3.0.1",
+ "favico.js": "^0.3.10",
+ "file-loader": "^4.0.0",
"font-awesome": "^4.7.0",
"glob": "^7.1.1",
"http-link-header": "^1.0.2",
--- /dev/null
- it 'converts h1 to p' do
- expect(Sanitize.fragment('<h1>Foo</h1>', subject)).to eq '<p>Foo</p>'
+ # frozen_string_literal: true
+
+ require 'rails_helper'
+ require Rails.root.join('app', 'lib', 'sanitize_config.rb')
+
+ describe Sanitize::Config do
+ describe '::MASTODON_STRICT' do
+ subject { Sanitize::Config::MASTODON_STRICT }
+
- it 'converts ul to p' do
- expect(Sanitize.fragment('<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>', subject)).to eq '<p>Check out:</p><p>Foo<br>Bar</p>'
- end
-
- it 'converts p inside ul' do
- expect(Sanitize.fragment('<ul><li><p>Foo</p><p>Bar</p></li><li>Baz</li></ul>', subject)).to eq '<p>Foo<br>Bar<br>Baz</p>'
- end
-
- it 'converts ul inside ul' do
- expect(Sanitize.fragment('<ul><li>Foo</li><li><ul><li>Bar</li><li>Baz</li></ul></li></ul>', subject)).to eq '<p>Foo<br>Bar<br>Baz</p>'
++ it 'keeps h1' do
++ expect(Sanitize.fragment('<h1>Foo</h1>', subject)).to eq '<h1>Foo</h1>'
+ end
+
++ it 'keeps ul' do
++ expect(Sanitize.fragment('<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>', subject)).to eq '<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>'
+ end
+ end
+ end
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
- autoprefixer@^9.5.1:
- version "9.5.1"
- resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.1.tgz#243b1267b67e7e947f28919d786b50d3bb0fb357"
- integrity sha512-KJSzkStUl3wP0D5sdMlP82Q52JLy5+atf2MHAre48+ckWkXgixmfHyWmA77wFDy6jTHU6mIgXv6hAQ2mf1PjJQ==
+atrament@^0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/atrament/-/atrament-0.2.3.tgz#6ccbc0daa6d3f25e5aeaeb31befeb78e86980348"
+
+ autoprefixer@^9.6.0:
+ version "9.6.0"
+ resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.6.0.tgz#0111c6bde2ad20c6f17995a33fad7cf6854b4c87"
+ integrity sha512-kuip9YilBqhirhHEGHaBTZKXL//xxGnzvsD0FtBQa6z+A69qZD6s/BAX9VzDF1i9VKDquTJDQaPLSEhOnL6FvQ==
dependencies:
- browserslist "^4.5.4"
- caniuse-lite "^1.0.30000957"
+ browserslist "^4.6.1"
+ caniuse-lite "^1.0.30000971"
+ chalk "^2.4.2"
normalize-range "^0.1.2"
num2fraction "^1.2.2"
- postcss "^7.0.14"
+ postcss "^7.0.16"
postcss-value-parser "^3.3.1"
aws-sign2@~0.7.0: