Skip to content

Commit e9bbc21

Browse files
authored
Merge pull request #29 from vanilla/feature/update-hmtmlawed
Update Htmlawed to version 1.2.15 - VNLA-5166
2 parents b1fc7b3 + 687b99d commit e9bbc21

15 files changed

Lines changed: 2503 additions & 1741 deletions

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
# Concurrency is only limited on pull requests. head_ref is only defined on PR triggers so otherwise it will use the random run id and always build all pushes.
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
phpunit-tests:
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
php-version: ["7.4", "8.0", "8.1", "8.2"]
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Installing PHP ${{ matrix.php-version }}
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php-version }}
30+
- name: Composer Install
31+
run: composer install -o
32+
- name: PHPUnit
33+
run: ./vendor/bin/phpunit -c ./phpunit.xml.dist

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
composer.lock
44
coverage.clover
55
tests/fixtures/filtered.html
6-
tests/fixtures/phantomjs.html
6+
tests/fixtures/phantomjs.html
7+
.phpunit.result.cache

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=5.4.0"
12+
"php": ">=7.4.0"
1313
},
1414
"require-dev": {
15-
"tburry/pquery": "~1.0.1"
15+
"tburry/pquery": "~1.0.1",
16+
"phpunit/phpunit": "^9.0"
1617
},
1718
"autoload": {
1819
"classmap": [
@@ -21,7 +22,7 @@
2122
},
2223
"autoload-dev": {
2324
"psr-4": {
24-
"Htmlawed\\Test\\": "tests"
25+
"Htmlawed\\Tests\\": "tests"
2526
}
2627
}
2728
}

src/Htmlawed.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Htmlawed {
1515
'anti_link_spam' => ['`.`', ''],
1616
'balance' => 1,
1717
'cdata' => 3,
18+
'safe' => 1,
1819
'comment' => 1,
1920
'css_expression' => 0,
2021
'deny_attribute' => 'on*,style',

src/htmLawed/htmLawed.php

100755100644
Lines changed: 1491 additions & 1029 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)