Skip to content

Commit f37dbe5

Browse files
authored
More docs and update copyright years (#110)
1 parent 7bd919d commit f37dbe5

File tree

12 files changed

+76
-35
lines changed

12 files changed

+76
-35
lines changed

src/z_css.erl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
%% @author Marc Worrell <[email protected]>
2-
%% @copyright 2014 Marc Worrell
2+
%% @copyright 2014-2025 Marc Worrell
3+
%% @doc Utility functions for CSS processing. This sanitizer is used by the
4+
%% HTML sanitizer for processing style attributes. It can also be called independently
5+
%% to sanitize CSS.
36
%%
4-
%% @doc Utility functions for CSS processing. Also used for sanitizing HTML.
7+
%% This is a strict parser for a (big) subset of CSS. It does not support all CSS
8+
%% constructs. If a block of CSS is not valid according to this parser, it is
9+
%% rejected.
10+
%%
11+
%% URLs in CSS are sanitized to "url()" to prevent external references.
12+
%%
13+
%% The grammar is included in z_css_parser.yrl and the lexer is in z_css_lexer.xrl.
14+
%% @end
515

6-
%% Copyright 2014 Marc Worrell
16+
%% Copyright 2014-2025 Marc Worrell
717
%%
818
%% Licensed under the Apache License, Version 2.0 (the "License");
919
%% you may not use this file except in compliance with the License.

src/z_css_lexer.xrl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
%% @author Marc Worrell <[email protected]>
2-
%% @copyright 2014 Marc Worrell
3-
%%
2+
%% @copyright 2014-2025 Marc Worrell
43
%% @doc Grammar for strict CSS parser. Based on http://www.w3.org/TR/CSS21/grammar.html
4+
%% @end
55

6-
%% Copyright 2014 Marc Worrell
6+
%% Copyright 2014-2025 Marc Worrell
77
%%
88
%% Licensed under the Apache License, Version 2.0 (the "License");
99
%% you may not use this file except in compliance with the License.

src/z_css_parser.yrl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
%% @author Marc Worrell <[email protected]>
2-
%% @copyright 2014 Marc Worrell
3-
%%
2+
%% @copyright 2014-2025 Marc Worrell
43
%% @doc Grammar for strict CSS parser. Based on http://www.w3.org/TR/CSS21/grammar.html
4+
%% @end
55

6-
%% Copyright 2014 Marc Worrell
6+
%% Copyright 2014-2025 Marc Worrell
77
%%
88
%% Licensed under the Apache License, Version 2.0 (the "License");
99
%% you may not use this file except in compliance with the License.

src/z_cssmin.erl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
%% @author Maas-Maarten Zeeman <[email protected]>
2-
%% @copyright 2018 Maas-Maarten Zeeman
3-
%% @doc Javascript minifier. Based on cssmin.c
2+
%% @copyright 2018-2025 Maas-Maarten Zeeman
3+
%% @doc Javascript minifier. Based on cssmin.c. Minimizes a Javascript binary
4+
%% by removing comments and unnecessary whitespace.
5+
%% @end
46

5-
%% Copyright 2018 Maas-Maarten Zeeman
7+
%% Copyright 2018-2025 Maas-Maarten Zeeman
68
%%
79
%% Licensed under the Apache License, Version 2.0 (the "License");
810
%% you may not use this file except in compliance with the License.

src/z_email_dnsbl.erl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
%% @author Marc Worrell
2-
%% @copyright 2015-2020 Marc Worrell
3-
%% @doc Check an IP address against some DNSBL providers (rfc5782)
4-
5-
%% Copyright 2015-2020 Marc Worrell
2+
%% @copyright 2015-2025 Marc Worrell
3+
%% @doc Check an IP address against the list that are maintained by
4+
%% DNSBL or DNSWL providers (rfc5782). There is a list of default
5+
%% black list providers in dns_blocklist/0 and of white list providers
6+
%% in dns_allowlist/0.
7+
%% @end
8+
9+
%% Copyright 2015-2025 Marc Worrell
610
%%
711
%% Licensed under the Apache License, Version 2.0 (the "License");
812
%% you may not use this file except in compliance with the License.

src/z_email_utils.erl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
%% @author Marc Worrell
2-
%% @copyright 2013 Marc Worrell
3-
%% @doc Useful routines for e-mail address handling.
2+
%% @copyright 2013-2025 Marc Worrell
3+
%% @doc Useful routines for e-mail address handling. Extract emails from a text
4+
%% and check if a text is a valid email address.
5+
%% @end.
46

5-
%% Copyright 2013 Marc Worrell
7+
%% Copyright 2013-2025 Marc Worrell
68
%%
79
%% Licensed under the Apache License, Version 2.0 (the "License");
810
%% you may not use this file except in compliance with the License.

src/z_filelib.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
%% @author Marc Worrell <[email protected]>
22
%% @copyright 2017-2025 Marc Worrell
3-
%% @doc Extra file functions.
3+
%% @doc Extra file functions to complement the standard library.
4+
%% Rename files between different filesystems, and ensure directories of
5+
%% a path exist. Also escape routines to safely handle filenames as command
6+
%% line arguments.
47
%% @end
58

69
%% Copyright 2017-2025 Marc Worrell
@@ -125,7 +128,8 @@ os_filename_bs([C|Rest], Acc) ->
125128
os_filename(Rest, [C,$\\|Acc]).
126129

127130

128-
%% @doc Simple escape function for command line arguments
131+
%% @doc Simple escape function for command line arguments. Escapes special characters
132+
%% in the filename using backslashes. The path is not quoted, use os_filename/1 for that.
129133
-spec os_escape(string()|binary()|undefined) -> string().
130134
os_escape(undefined) ->
131135
"";

src/z_html.erl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
%% @author Marc Worrell <[email protected]>
2-
%% @copyright 2009-2024 Marc Worrell
3-
%% @doc Utility functions for html processing. Also used for property filtering (by m_rsc_update).
2+
%% @copyright 2009-2025 Marc Worrell
3+
%% @doc Utility functions sanitizing, escaping and filtering HTML, and sanitize property lists/maps.
4+
%%
5+
%% Utiliy functions to:
6+
%%
7+
%% - Sanitize HTML texts
8+
%% - Truncate HTML, whilst ensuring that opened tags are properly closed.
9+
%% - Escape and unescape HTML texts
10+
%% - Newline to br-tag mapping (and vice versa)
11+
%% - Stripping HTML tags from a text
12+
%% - Sanitize nested property lists/maps, using type hints from the property names.
13+
%% - Make relative URLs absolute based on a base URL.
414
%% @end
515

6-
%% Copyright 2009-2024 Marc Worrell
16+
%% Copyright 2009-2025 Marc Worrell
717
%%
818
%% Licensed under the Apache License, Version 2.0 (the "License");
919
%% you may not use this file except in compliance with the License.

src/z_svg.erl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
%% @author Marc Worrell <[email protected]>
2-
%% @copyright 2016 Copyright Channel.Me B.V.
3-
%% @doc Utility functions for svg processing.
2+
%% @copyright 2016-2025 Copyright Channel.Me B.V.
3+
%% @doc Utility functions for svg processing. Sanitize SVG content to remove
4+
%% potentially harmful elements and attributes.
5+
%% The sanitizer uses a whitelist of allowed elements and attributes.
6+
%% @end
47

5-
%% Copyright 2016 Copyright Channel.Me B.V.
8+
%% Copyright 2016-2025 Copyright Channel.Me B.V.
69
%%
710
%% Licensed under the Apache License, Version 2.0 (the "License");
811
%% you may not use this file except in compliance with the License.

src/z_url.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% @author Marc Worrell
22
%% @copyright 2012-2024 Marc Worrell
3-
%% @doc Misc utility URL functions for zotonic
3+
%% @doc Misc utility URL functions for Zotonic.
44
%% @end
55

66
%% Copyright 2012-2024 Marc Worrell

0 commit comments

Comments
 (0)