[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Makefile.tres, tp/t/html_tests.t (inline_in_
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Makefile.tres, tp/t/html_tests.t (inline_in_node): test showing that HTML elements in @inlineraw on @node and @title line end up in attributes in link or meta. Based on Benjamin Kalish report. |
Date: |
Sun, 13 Oct 2024 19:01:30 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 53695000ad * tp/Makefile.tres, tp/t/html_tests.t (inline_in_node):
test showing that HTML elements in @inlineraw on @node and @title line end up
in attributes in link or meta. Based on Benjamin Kalish report.
53695000ad is described below
commit 53695000ad9039e44fe3c3d10ea5e5dafcb21e9a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Oct 14 01:01:20 2024 +0200
* tp/Makefile.tres, tp/t/html_tests.t (inline_in_node): test showing
that HTML elements in @inlineraw on @node and @title line end up in
attributes in link or meta. Based on Benjamin Kalish report.
---
ChangeLog | 6 +
tp/Makefile.tres | 2 +
tp/t/html_tests.t | 14 +
tp/t/results/html_tests/inline_in_node.pl | 468 +++++++++++++++++++++
.../inline_in_node/res_html/htmlOnehtml.html | 36 ++
.../html_tests/inline_in_node/res_html/index.html | 42 ++
6 files changed, 568 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 2dba4be204..2bd2ae5d00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-13 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Makefile.tres, tp/t/html_tests.t (inline_in_node): test showing
+ that HTML elements in @inlineraw on @node and @title line end up in
+ attributes in link or meta. Based on Benjamin Kalish report.
+
2024-10-13 Gavin Smith <gavinsmith0123@gmail.com>
* info/infokey.c (compile): warn if octal sequence is out of range.
diff --git a/tp/Makefile.tres b/tp/Makefile.tres
index b677fd0480..ec22787062 100644
--- a/tp/Makefile.tres
+++ b/tp/Makefile.tres
@@ -724,6 +724,8 @@ test_files_generated_list =
$(test_tap_files_generated_list) \
t/results/html_tests/info_js_dir_html_file_js_weblabels_file_undef.pl \
t/results/html_tests/info_js_dir_html_file_js_weblabels_file_undef/res_html \
t/results/html_tests/info_js_dir_html_text.pl \
+ t/results/html_tests/inline_in_node.pl \
+ t/results/html_tests/inline_in_node/res_html \
t/results/html_tests/itemize_arguments.pl \
t/results/html_tests/itemize_arguments/res_html \
t/results/html_tests/itemize_arguments_enable_encoding.pl \
diff --git a/tp/t/html_tests.t b/tp/t/html_tests.t
index bbbeff7f5c..f8684358e2 100644
--- a/tp/t/html_tests.t
+++ b/tp/t/html_tests.t
@@ -1593,7 +1593,21 @@ $nodedescription_description_texinfo, {}, {'FORMAT_MENU'
=> 'menu',
'USE_NODES' => 0,
# needed for the test
'SPLIT' => 'node'}],
+# Show that HTML elements in inline raw in title or node name end up in
+# attributes, in meta description content, but also in link. This can
+# be considered a feature, raw HTML should not be escaped, but it also
+# means that if it ends up in attributes there should only be entities,
+# no element.
+['inline_in_node',
+'@settitle @inlineraw{html,<strong
class="ttitle">}Title@inlineraw{html,</strong>}
+@node Top
+@top
+
+@node @inlineraw{html,<code class="tnode">}One@inlineraw{html,</code>}
+@chapter @inlineraw{html,<span class="test">}One@inlineraw{html,</span>}
+
+'],
);
diff --git a/tp/t/results/html_tests/inline_in_node.pl
b/tp/t/results/html_tests/inline_in_node.pl
new file mode 100644
index 0000000000..31fcead126
--- /dev/null
+++ b/tp/t/results/html_tests/inline_in_node.pl
@@ -0,0 +1,468 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text %result_indices_sort_strings);
+
+use utf8;
+
+$result_trees{'inline_in_node'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '<strong class="ttitle">'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 1
+ }
+ },
+ {
+ 'text' => 'Title'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '</strong>'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 1
+ }
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'settitle',
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 1
+ }
+ },
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'type' => 'preamble_before_content'
+ }
+ ],
+ 'type' => 'before_node_section'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'Top'
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'Top'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 3
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'top',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {},
+ 'source_info' => {
+ 'line_nr' => 4
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '<code class="tnode">'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 6
+ }
+ },
+ {
+ 'text' => 'One'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '</code>'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 6
+ }
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'is_target' => 1,
+ 'normalized' => 'htmlOnehtml'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 6
+ }
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '<span class="test">'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 7
+ }
+ },
+ {
+ 'text' => 'One'
+ },
+ {
+ 'args' => [
+ {
+ 'contents' => [
+ {
+ 'text' => 'html'
+ }
+ ],
+ 'type' => 'brace_arg'
+ },
+ {
+ 'contents' => [
+ {
+ 'text' => '</span>'
+ }
+ ],
+ 'type' => 'brace_arg'
+ }
+ ],
+ 'cmdname' => 'inlineraw',
+ 'extra' => {
+ 'expand_index' => 1,
+ 'format' => 'html'
+ },
+ 'source_info' => {
+ 'line_nr' => 7
+ }
+ }
+ ],
+ 'info' => {
+ 'spaces_after_argument' => {
+ 'text' => '
+'
+ }
+ },
+ 'type' => 'line_arg'
+ }
+ ],
+ 'cmdname' => 'chapter',
+ 'contents' => [
+ {
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ }
+ ],
+ 'extra' => {
+ 'section_number' => '1'
+ },
+ 'info' => {
+ 'spaces_before_argument' => {
+ 'text' => ' '
+ }
+ },
+ 'source_info' => {
+ 'line_nr' => 7
+ }
+ }
+ ],
+ 'type' => 'document_root'
+};
+
+$result_texis{'inline_in_node'} = '@settitle @inlineraw{html,<strong
class="ttitle">}Title@inlineraw{html,</strong>}
+
+@node Top
+@top
+
+@node @inlineraw{html,<code class="tnode">}One@inlineraw{html,</code>}
+@chapter @inlineraw{html,<span class="test">}One@inlineraw{html,</span>}
+
+';
+
+
+$result_texts{'inline_in_node'} = '
+
+1 <span class="test">One</span>
+*******************************
+
+';
+
+$result_sectioning{'inline_in_node'} = {
+ 'extra' => {
+ 'section_childs' => [
+ {
+ 'cmdname' => 'top',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ 'section_childs' => [
+ {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'associated_node' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'normalized' => 'htmlOnehtml'
+ }
+ },
+ 'section_directions' => {
+ 'up' => {}
+ },
+ 'section_level' => 1,
+ 'section_number' => '1',
+ 'toplevel_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ }
+ }
+ }
+ ],
+ 'section_level' => 0,
+ 'sectioning_root' => {},
+ 'toplevel_directions' => {}
+ }
+ }
+ ],
+ 'section_level' => -1
+ }
+};
+$result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'section_directions'}{'up'}
= $result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'prev'}
= $result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0]{'extra'}{'section_childs'}[0]{'extra'}{'toplevel_directions'}{'up'}
= $result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0];
+$result_sectioning{'inline_in_node'}{'extra'}{'section_childs'}[0]{'extra'}{'sectioning_root'}
= $result_sectioning{'inline_in_node'};
+
+$result_nodes{'inline_in_node'} = [
+ {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'top',
+ 'extra' => {}
+ },
+ 'node_directions' => {
+ 'next' => {
+ 'cmdname' => 'node',
+ 'extra' => {
+ 'associated_section' => {
+ 'cmdname' => 'chapter',
+ 'extra' => {
+ 'section_number' => '1'
+ }
+ },
+ 'node_directions' => {
+ 'prev' => {},
+ 'up' => {}
+ },
+ 'normalized' => 'htmlOnehtml'
+ }
+ }
+ },
+ 'normalized' => 'Top'
+ }
+ },
+ {}
+];
+$result_nodes{'inline_in_node'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'prev'}
= $result_nodes{'inline_in_node'}[0];
+$result_nodes{'inline_in_node'}[0]{'extra'}{'node_directions'}{'next'}{'extra'}{'node_directions'}{'up'}
= $result_nodes{'inline_in_node'}[0];
+$result_nodes{'inline_in_node'}[1] =
$result_nodes{'inline_in_node'}[0]{'extra'}{'node_directions'}{'next'};
+
+$result_menus{'inline_in_node'} = [
+ {
+ 'extra' => {
+ 'normalized' => 'Top'
+ }
+ },
+ {
+ 'extra' => {
+ 'normalized' => 'htmlOnehtml'
+ }
+ }
+];
+
+$result_errors{'inline_in_node'} = [];
+
+
+$result_floats{'inline_in_node'} = {};
+
+
+1;
diff --git a/tp/t/results/html_tests/inline_in_node/res_html/htmlOnehtml.html
b/tp/t/results/html_tests/inline_in_node/res_html/htmlOnehtml.html
new file mode 100644
index 0000000000..42cd3b6d13
--- /dev/null
+++ b/tp/t/results/html_tests/inline_in_node/res_html/htmlOnehtml.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, https://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title><code class="tnode">One</code> (<strong
class="ttitle">Title</strong>)</title>
+
+<meta name="description" content="<code class="tnode">One</code> (<strong
class="ttitle">Title</strong>)">
+<meta name="keywords" content="<code class="tnode">One</code> (<strong
class="ttitle">Title</strong>)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="index.html" rel="start" title="Top">
+<link href="index.html" rel="up" title="Top">
+<link href="index.html" rel="prev" title="Top">
+<style type="text/css">
+<!--
+a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
+span:hover a.copiable-link {visibility: visible}
+-->
+</style>
+
+
+</head>
+
+<body lang="en">
+<div class="chapter-level-extent" id="htmlOnehtml">
+<h2 class="chapter" id="htmlOnehtml-1"><span>1 <span class="test">One</span><a
class="copiable-link" href="#htmlOnehtml-1"> ¶</a></span></h2>
+
+</div>
+
+
+
+</body>
+</html>
diff --git a/tp/t/results/html_tests/inline_in_node/res_html/index.html
b/tp/t/results/html_tests/inline_in_node/res_html/index.html
new file mode 100644
index 0000000000..fc9dfc31cf
--- /dev/null
+++ b/tp/t/results/html_tests/inline_in_node/res_html/index.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<!-- Created by texinfo, https://www.gnu.org/software/texinfo/ -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Top (<strong class="ttitle">Title</strong>)</title>
+
+<meta name="description" content="Top (<strong class="ttitle">Title</strong>)">
+<meta name="keywords" content="Top (<strong class="ttitle">Title</strong>)">
+<meta name="resource-type" content="document">
+<meta name="distribution" content="global">
+<meta name="viewport" content="width=device-width,initial-scale=1">
+
+<link href="#Top" rel="start" title="Top">
+<link href="htmlOnehtml.html" rel="next" title="<code
class="tnode">One</code>">
+
+
+</head>
+
+<body lang="en">
+
+<div class="top-level-extent" id="Top">
+<div class="nav-panel">
+<p>
+Next: <a href="htmlOnehtml.html" accesskey="n" rel="next"><span
class="test">One</span></a> </p>
+</div>
+<hr>
+<a class="top" id="SEC_Top"></a>
+<ul class="mini-toc">
+<li><a href="htmlOnehtml.html" accesskey="1"><span
class="test">One</span></a></li>
+</ul>
+</div>
+<hr>
+<div class="nav-panel">
+<p>
+Next: <a href="htmlOnehtml.html" accesskey="n" rel="next"><span
class="test">One</span></a> </p>
+</div>
+
+
+
+</body>
+</html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Makefile.tres, tp/t/html_tests.t (inline_in_node): test showing that HTML elements in @inlineraw on @node and @title line end up in attributes in link or meta. Based on Benjamin Kalish report.,
Patrice Dumas <=