New Upstream Release - libhtml-restrict-perl
Ready changes
Summary
Merged new upstream version: 3.0.2 (was: 3.0.1).
Resulting package
Built on 2023-05-04T22:32 (took 16m55s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-releases libhtml-restrict-perl
Lintian Result
Diff
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 4d320c2..889599f 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -10,6 +10,7 @@ patches, bug reports, help with troubleshooting, etc. A huge
* Ben Bullock
* Clayton Cottingham
* David Golden
+ * E. Choroba
* Fitz Elliott
* Graham Knop
* Graham TerMarsch
diff --git a/Changes b/Changes
index 3f89df4..7e2572c 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Revision history for HTML-Restrict
+v3.0.2 2023-04-23 17:06:28Z
+ - Add create_newlines to replace BR and P by 1, resp. 2 newlines
+ (GH#46) (E. Choroba)
+
v3.0.1 2022-09-22 22:27:40Z
- Add a filter_text attribute. This can be used to disable text
encoding. (GH#44) (ccottingham-presinet)
diff --git a/MANIFEST b/MANIFEST
index c5c5617..d2f0eff 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.025.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030.
CONTRIBUTORS
Changes
INSTALL
@@ -23,6 +23,7 @@ t/00-report-prereqs.t
t/attribute_constraints.t
t/comments.t
t/control-characters.t
+t/create-newlines.t
t/declaration.t
t/empty-element-tags.t
t/filter_text.t
diff --git a/META.json b/META.json
index 039a0f0..4aaa834 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
"Olaf Alders <olaf@wundercounter.com>"
],
"dynamic_config" : 0,
- "generated_by" : "Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010",
+ "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
@@ -101,7 +101,7 @@
"web" : "https://github.com/oalders/html-restrict"
}
},
- "version" : "v3.0.1",
+ "version" : "v3.0.2",
"x_Dist_Zilla" : {
"perl" : {
"version" : "5.036000"
@@ -142,7 +142,7 @@
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Author::OALDERS/AutoPrereqs",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
@@ -157,12 +157,12 @@
}
},
"name" : "@Author::OALDERS/MakeMaker",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::CPANFile",
"name" : "@Author::OALDERS/CPANFile",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::ContributorsFile",
@@ -172,37 +172,37 @@
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Author::OALDERS/MetaJSON",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Author::OALDERS/MetaYAML",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Author::OALDERS/Manifest",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::MetaNoIndex",
"name" : "@Author::OALDERS/MetaNoIndex",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Author::OALDERS/MetaConfig",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "@Author::OALDERS/MetaResources",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Author::OALDERS/License",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::InstallGuide",
@@ -224,12 +224,12 @@
}
},
"name" : "@Author::OALDERS/Modules for use with tidyall",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Author::OALDERS/ExecDir",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Test::PodSpelling",
@@ -256,6 +256,7 @@
"TerMarsch",
"XSS",
"bolded",
+ "br",
"fREW",
"href",
"img",
@@ -282,7 +283,7 @@
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Author::OALDERS/PodSyntaxTests",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
@@ -328,12 +329,12 @@
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Author::OALDERS/TestRelease",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
"name" : "@Author::OALDERS/Test::ReportPrereqs",
- "version" : "0.028"
+ "version" : "0.029"
},
{
"class" : "Dist::Zilla::Plugin::Test::Synopsis",
@@ -371,99 +372,99 @@
"Dist::Zilla::Plugin::PodWeaver" : {
"finder" : [
":InstallModules",
- ":ExecFiles"
+ ":PerlExecFiles"
],
"plugins" : [
{
"class" : "Pod::Weaver::Plugin::EnsurePod5",
"name" : "@CorePrep/EnsurePod5",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Plugin::H1Nester",
"name" : "@CorePrep/H1Nester",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Plugin::SingleEncoding",
"name" : "@Default/SingleEncoding",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Name",
"name" : "@Default/Name",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Version",
"name" : "@Default/Version",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/prelude",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "SYNOPSIS",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "DESCRIPTION",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Generic",
"name" : "OVERVIEW",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "ATTRIBUTES",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "METHODS",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Collect",
"name" : "FUNCTIONS",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Leftovers",
"name" : "@Default/Leftovers",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Region",
"name" : "@Default/postlude",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Authors",
"name" : "@Default/Authors",
- "version" : "4.018"
+ "version" : "4.019"
},
{
"class" : "Pod::Weaver::Section::Legal",
"name" : "@Default/Legal",
- "version" : "4.018"
+ "version" : "4.019"
}
]
}
},
"name" : "@Author::OALDERS/PodWeaver",
- "version" : "4.009"
+ "version" : "4.010"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Author::OALDERS/PruneCruft",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::CopyFilesFromBuild",
@@ -535,7 +536,7 @@
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"repo_root" : "."
}
},
@@ -546,7 +547,7 @@
"class" : "Dist::Zilla::Plugin::Git::Contributors",
"config" : {
"Dist::Zilla::Plugin::Git::Contributors" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"include_authors" : 0,
"include_releaser" : 1,
"order_by" : "name",
@@ -580,7 +581,7 @@
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Author::OALDERS/ShareDir",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::CheckIssues",
@@ -590,12 +591,12 @@
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Author::OALDERS/ConfirmRelease",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Author::OALDERS/UploadToCPAN",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -606,7 +607,7 @@
}
},
"name" : "@Author::OALDERS/@Git::VersionManager/pluginbundle version",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional",
@@ -666,7 +667,7 @@
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
@@ -683,12 +684,12 @@
"branch" : null,
"changelog" : "Changes",
"signed" : 0,
- "tag" : "v3.0.1",
+ "tag" : "v3.0.2",
"tag_format" : "v%V",
"tag_message" : "v%V"
},
"Dist::Zilla::Role::Git::Repo" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
@@ -717,7 +718,7 @@
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Author::OALDERS/@Git::VersionManager/NextRelease",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Git::Commit",
@@ -739,7 +740,7 @@
"changelog" : "Changes"
},
"Dist::Zilla::Role::Git::Repo" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"repo_root" : "."
},
"Dist::Zilla::Role::Git::StringFormatter" : {
@@ -759,7 +760,7 @@
"remotes_must_exist" : 1
},
"Dist::Zilla::Role::Git::Repo" : {
- "git_version" : "2.37.3",
+ "git_version" : "2.40.0",
"repo_root" : "."
}
},
@@ -775,7 +776,7 @@
}
},
"name" : "Prereqs",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
@@ -786,57 +787,57 @@
}
},
"name" : "TestRequires",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExtraTestFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":PerlExecFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":AllFiles",
- "version" : "6.025"
+ "version" : "6.030"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":NoFiles",
- "version" : "6.025"
+ "version" : "6.030"
}
],
"zilla" : {
@@ -844,7 +845,7 @@
"config" : {
"is_trial" : 0
},
- "version" : "6.025"
+ "version" : "6.030"
}
},
"x_contributors" : [
@@ -852,6 +853,7 @@
"Ben Bullock <benkasminbullock@gmail.com>",
"Clayton Cottingham <ccottingham@presinet.com>",
"David Golden <dagolden@cpan.org>",
+ "E. Choroba <choroba@users.noreply.github.com>",
"Fitz Elliott <fitz.elliott@gmail.com>",
"Graham Knop <haarg@haarg.org>",
"Graham TerMarsch <graham@howlingfrog.com>",
@@ -862,7 +864,7 @@
"skaufman <sam@socialflow.com>"
],
"x_generated_by_perl" : "v5.36.0",
- "x_serialization_backend" : "Cpanel::JSON::XS version 4.29",
+ "x_serialization_backend" : "Cpanel::JSON::XS version 4.36",
"x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
}
diff --git a/META.yml b/META.yml
index 0f6b61c..efca887 100644
--- a/META.yml
+++ b/META.yml
@@ -13,7 +13,7 @@ configure_requires:
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -44,7 +44,7 @@ resources:
bugtracker: https://github.com/oalders/html-restrict/issues
homepage: https://github.com/oalders/html-restrict
repository: https://github.com/oalders/html-restrict.git
-version: v3.0.1
+version: v3.0.2
x_Dist_Zilla:
perl:
version: '5.036000'
@@ -77,7 +77,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Author::OALDERS/AutoPrereqs'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::CheckChangesHasContent
name: '@Author::OALDERS/CheckChangesHasContent'
@@ -88,11 +88,11 @@ x_Dist_Zilla:
Dist::Zilla::Role::TestRunner:
default_jobs: '8'
name: '@Author::OALDERS/MakeMaker'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::CPANFile
name: '@Author::OALDERS/CPANFile'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::ContributorsFile
name: '@Author::OALDERS/ContributorsFile'
@@ -100,31 +100,31 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Author::OALDERS/MetaJSON'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Author::OALDERS/MetaYAML'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Manifest
name: '@Author::OALDERS/Manifest'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::MetaNoIndex
name: '@Author::OALDERS/MetaNoIndex'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Author::OALDERS/MetaConfig'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::MetaResources
name: '@Author::OALDERS/MetaResources'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::License
name: '@Author::OALDERS/License'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::InstallGuide
config:
@@ -140,11 +140,11 @@ x_Dist_Zilla:
phase: develop
type: requires
name: '@Author::OALDERS/Modules for use with tidyall'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Author::OALDERS/ExecDir'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Test::PodSpelling
config:
@@ -169,6 +169,7 @@ x_Dist_Zilla:
- TerMarsch
- XSS
- bolded
+ - br
- fREW
- href
- img
@@ -190,7 +191,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Author::OALDERS/PodSyntaxTests'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Test::CPAN::Changes
config:
@@ -224,11 +225,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Author::OALDERS/TestRelease'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Test::ReportPrereqs
name: '@Author::OALDERS/Test::ReportPrereqs'
- version: '0.028'
+ version: '0.029'
-
class: Dist::Zilla::Plugin::Test::Synopsis
name: '@Author::OALDERS/Test::Synopsis'
@@ -258,78 +259,78 @@ x_Dist_Zilla:
Dist::Zilla::Plugin::PodWeaver:
finder:
- ':InstallModules'
- - ':ExecFiles'
+ - ':PerlExecFiles'
plugins:
-
class: Pod::Weaver::Plugin::EnsurePod5
name: '@CorePrep/EnsurePod5'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Plugin::H1Nester
name: '@CorePrep/H1Nester'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Plugin::SingleEncoding
name: '@Default/SingleEncoding'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Name
name: '@Default/Name'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Version
name: '@Default/Version'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Region
name: '@Default/prelude'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: SYNOPSIS
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: DESCRIPTION
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Generic
name: OVERVIEW
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: ATTRIBUTES
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: METHODS
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Collect
name: FUNCTIONS
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Leftovers
name: '@Default/Leftovers'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Region
name: '@Default/postlude'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Authors
name: '@Default/Authors'
- version: '4.018'
+ version: '4.019'
-
class: Pod::Weaver::Section::Legal
name: '@Default/Legal'
- version: '4.018'
+ version: '4.019'
name: '@Author::OALDERS/PodWeaver'
- version: '4.009'
+ version: '4.010'
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Author::OALDERS/PruneCruft'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::CopyFilesFromBuild
name: '@Author::OALDERS/CopyFilesFromBuild'
@@ -386,7 +387,7 @@ x_Dist_Zilla:
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
- git_version: 2.37.3
+ git_version: 2.40.0
repo_root: .
name: '@Author::OALDERS/Git::Check'
version: '2.048'
@@ -394,7 +395,7 @@ x_Dist_Zilla:
class: Dist::Zilla::Plugin::Git::Contributors
config:
Dist::Zilla::Plugin::Git::Contributors:
- git_version: 2.37.3
+ git_version: 2.40.0
include_authors: 0
include_releaser: 1
order_by: name
@@ -419,7 +420,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Author::OALDERS/ShareDir'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::CheckIssues
name: '@Author::OALDERS/CheckIssues'
@@ -427,11 +428,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Author::OALDERS/ConfirmRelease'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Author::OALDERS/UploadToCPAN'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -439,7 +440,7 @@ x_Dist_Zilla:
phase: develop
type: recommends
name: '@Author::OALDERS/@Git::VersionManager/pluginbundle version'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::RewriteVersion::Transitional
config:
@@ -486,7 +487,7 @@ x_Dist_Zilla:
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
- git_version: 2.37.3
+ git_version: 2.40.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
@@ -499,11 +500,11 @@ x_Dist_Zilla:
branch: ~
changelog: Changes
signed: 0
- tag: v3.0.1
+ tag: v3.0.2
tag_format: v%V
tag_message: v%V
Dist::Zilla::Role::Git::Repo:
- git_version: 2.37.3
+ git_version: 2.40.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
@@ -524,7 +525,7 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Author::OALDERS/@Git::VersionManager/NextRelease'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
@@ -541,7 +542,7 @@ x_Dist_Zilla:
- (?^:^lib/.*\.pm$)
changelog: Changes
Dist::Zilla::Role::Git::Repo:
- git_version: 2.37.3
+ git_version: 2.40.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone: local
@@ -555,7 +556,7 @@ x_Dist_Zilla:
- origin
remotes_must_exist: 1
Dist::Zilla::Role::Git::Repo:
- git_version: 2.37.3
+ git_version: 2.40.0
repo_root: .
name: '@Author::OALDERS/Git::Push'
version: '2.048'
@@ -566,7 +567,7 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::Prereqs
config:
@@ -574,57 +575,58 @@ x_Dist_Zilla:
phase: test
type: requires
name: TestRequires
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExtraTestFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':PerlExecFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':AllFiles'
- version: '6.025'
+ version: '6.030'
-
class: Dist::Zilla::Plugin::FinderCode
name: ':NoFiles'
- version: '6.025'
+ version: '6.030'
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
- version: '6.025'
+ version: '6.030'
x_contributors:
- "Arthur Axel 'fREW' Schmidt <frioux@gmail.com>"
- 'Ben Bullock <benkasminbullock@gmail.com>'
- 'Clayton Cottingham <ccottingham@presinet.com>'
- 'David Golden <dagolden@cpan.org>'
+ - 'E. Choroba <choroba@users.noreply.github.com>'
- 'Fitz Elliott <fitz.elliott@gmail.com>'
- 'Graham Knop <haarg@haarg.org>'
- 'Graham TerMarsch <graham@howlingfrog.com>'
@@ -634,5 +636,5 @@ x_contributors:
- 'perlpong <calyx238@gmail.com>'
- 'skaufman <sam@socialflow.com>'
x_generated_by_perl: v5.36.0
-x_serialization_backend: 'YAML::Tiny version 1.73'
+x_serialization_backend: 'YAML::Tiny version 1.74'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
diff --git a/Makefile.PL b/Makefile.PL
index d4d1191..571a5cd 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.025.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030.
use strict;
use warnings;
@@ -39,7 +39,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.96",
"warnings" => 0
},
- "VERSION" => "v3.0.1",
+ "VERSION" => "v3.0.2",
"test" => {
"TESTS" => "t/*.t"
}
diff --git a/README.md b/README.md
index 2722dc9..c62e07f 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ HTML::Restrict - Strip unwanted HTML tags and attributes
# VERSION
-version v3.0.1
+version v3.0.2
# SYNOPSIS
@@ -233,6 +233,12 @@ HTML::Restrict recognizes:
$html = $hr->process( $html );
# $html is now: "<!-- comments! -->foo"
+- create\_newlines => \[0|1\]
+
+ Set the value to true if you'd like to have each br tag replaced by a
+ newline and every p tag replaced by two newlines. If a tag is
+ specified in the allowed HTML, it won't be replaced.
+
- replace\_img => \[0|1|CodeRef\]
Set the value to true if you'd like to have img tags replaced with
diff --git a/cpanfile b/cpanfile
index 3d076cb..47043ab 100644
--- a/cpanfile
+++ b/cpanfile
@@ -1,4 +1,4 @@
-# This file is generated by Dist::Zilla::Plugin::CPANFile v6.025
+# This file is generated by Dist::Zilla::Plugin::CPANFile v6.030
# Do not edit this file directly. To change prereqs, edit the `dist.ini` file.
requires "Carp" => "0";
diff --git a/debian/changelog b/debian/changelog
index 700ecf5..d2e7903 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libhtml-restrict-perl (3.0.2-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 04 May 2023 22:16:45 -0000
+
libhtml-restrict-perl (3.0.1-1) unstable; urgency=medium
* Team upload.
diff --git a/lib/HTML/Restrict.pm b/lib/HTML/Restrict.pm
index 66e4252..0f02b99 100644
--- a/lib/HTML/Restrict.pm
+++ b/lib/HTML/Restrict.pm
@@ -4,7 +4,7 @@ use 5.006;
package HTML::Restrict;
use version;
-our $VERSION = 'v3.0.1';
+our $VERSION = 'v3.0.2';
use Carp qw( croak );
use Data::Dump qw( dump );
@@ -31,6 +31,12 @@ has allow_declaration => (
default => 0,
);
+has create_newlines => (
+ is => 'rw',
+ isa => Bool,
+ default => 0,
+);
+
has debug => (
is => 'rw',
isa => Bool,
@@ -245,6 +251,13 @@ sub _build_parser {
}
$self->_processed( ( $self->_processed || q{} ) . $alt );
}
+ elsif ( $tagname eq 'br' && $self->create_newlines ) {
+ $self->_processed( ( $self->_processed || q{} ) . "\n" );
+ }
+ elsif ( $tagname eq 'p' && $self->create_newlines ) {
+ $self->_processed(
+ ( $self->_processed || q{} ) . "\n\n" );
+ }
elsif ( any { $_ eq $tagname }
@{ $self->strip_enclosed_content } ) {
print "adding $tagname to strippers" if $self->debug;
@@ -414,7 +427,7 @@ HTML::Restrict - Strip unwanted HTML tags and attributes
=head1 VERSION
-version v3.0.1
+version v3.0.2
=head1 SYNOPSIS
@@ -645,6 +658,12 @@ feature is off by default.
$html = $hr->process( $html );
# $html is now: "<!-- comments! -->foo"
+=item * create_newlines => [0|1]
+
+Set the value to true if you'd like to have each br tag replaced by a
+newline and every p tag replaced by two newlines. If a tag is
+specified in the allowed HTML, it won't be replaced.
+
=item * replace_img => [0|1|CodeRef]
Set the value to true if you'd like to have img tags replaced with
diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t
index c3a94ca..5696476 100644
--- a/t/00-report-prereqs.t
+++ b/t/00-report-prereqs.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.028
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029
use Test::More tests => 1;
@@ -109,20 +109,24 @@ for my $phase ( qw(configure build test runtime develop other) ) {
my @reports = [qw/Module Want Have/];
for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) {
- next if $mod eq 'perl';
next if grep { $_ eq $mod } @exclude;
- my $file = $mod;
- $file =~ s{::}{/}g;
- $file .= ".pm";
- my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
-
my $want = $req_hash->{$phase}{$type}{$mod};
$want = "undef" unless defined $want;
$want = "any" if !$want && $want == 0;
+ if ($mod eq 'perl') {
+ push @reports, ['perl', $want, $]];
+ next;
+ }
+
my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required";
+ my $file = $mod;
+ $file =~ s{::}{/}g;
+ $file .= ".pm";
+ my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC;
+
if ($prefix) {
my $have = MM->parse_version( File::Spec->catfile($prefix, $file) );
$have = "undef" unless defined $have;
diff --git a/t/create-newlines.t b/t/create-newlines.t
new file mode 100755
index 0000000..49fa2dd
--- /dev/null
+++ b/t/create-newlines.t
@@ -0,0 +1,43 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use HTML::Restrict ();
+use Test::More;
+
+my $hr = HTML::Restrict->new();
+
+{
+ my $html = q[Line 1<p>Line 2<br>Line 3];
+ my $processed = $hr->process($html);
+ is $processed, 'Line 1Line 2Line 3', 'off by default';
+}
+
+$hr->create_newlines(1);
+
+{
+ my $html = q[
+Line 1<br>Line 2<br/>Line 3<br />Line 4
+];
+ my $processed = $hr->process($html);
+ is $processed, "Line 1\nLine 2\nLine 3\nLine 4",
+ 'replace <br> by a newline';
+}
+
+{
+ my $html = q[
+Paragraph 1<p>Paragraph 2<p>Paragraph 3</p><p>Paragraph 4];
+ my $processed = $hr->process($html);
+ is $processed, "Paragraph 1\n\nParagraph 2\n\nParagraph 3\n\nParagraph 4",
+ 'replace <p> by 2 newlines';
+}
+
+{
+ my $html = q[Line 1<p>Line 2<br>Line 3];
+ $hr->set_rules( { p => [] } );
+ my $processed = $hr->process($html);
+ is $processed, "Line 1<p>Line 2\nLine 3", 'rules have precedence';
+}
+
+done_testing();
diff --git a/xt/author/eol.t b/xt/author/eol.t
index d93876f..b534561 100644
--- a/xt/author/eol.t
+++ b/xt/author/eol.t
@@ -14,6 +14,7 @@ my @files = (
't/attribute_constraints.t',
't/comments.t',
't/control-characters.t',
+ 't/create-newlines.t',
't/declaration.t',
't/empty-element-tags.t',
't/filter_text.t',
diff --git a/xt/author/pod-spell.t b/xt/author/pod-spell.t
index b050e80..3de00a9 100644
--- a/xt/author/pod-spell.t
+++ b/xt/author/pod-spell.t
@@ -17,6 +17,7 @@ Axel
Ben
Bullock
Carwyn
+Choroba
Clayton
Cottingham
DOCTYPE
@@ -43,8 +44,10 @@ TerMarsch
XSS
benkasminbullock
bolded
+br
calyx238
ccottingham
+choroba
dagolden
ether
fREW
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files