You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: regenerate fixtures for html-pipeline v3 sanitizer (Selma)
html-pipeline v3 replaces the v1 SanitizationFilter (Sanitize gem) with one
backed by Selma. The default allowlist and serialization differ in observable
but reasonable ways:
* Heading/anchor IDs (e.g. <h2 id="first-section">) are now preserved, fixing
TOC anchor links that v1 stripped silently.
* <span id=...>, <div id=...>, and <caption> elements are preserved.
* Bare-filename relative hrefs (<a href="rawr.html">) are dropped because
Selma's :relative protocol matcher requires a leading ./, ../, or /. Absolute
http(s) and root-relative links are unaffected.
* Self-closing tags serialize as <br/> instead of <br>.
* Non-ASCII glyphs in attribute-free text are emitted as numeric entities
(\u274F -> ❏).
These fixtures document representative pipeline output, not contracts the
library itself enforces - real consumers build their own pipelines.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Zack Koppert <zkoppert@github.com>
Copy file name to clipboardExpand all lines: test/markups/README.creole.html
+1-5Lines changed: 1 addition & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,4 @@
1
-
<h1>H1</h1><h2>H2</h2><p>paragraph of text that will be turned into a paragraph element. It can go over several lines with line breaks, it will be turned into a contiguous paragraph element.</p><p>You can force a linebreak in your paragraph text<br>thusly.</p><ul>
2
-
<li>a list element<ul><li>sub list element</li></ul>
3
-
</li>
4
-
<li>2nd list element</li>
5
-
</ul><pre>pre formatted text
1
+
<h1>H1</h1><h2>H2</h2><p>paragraph of text that will be turned into a paragraph element. It can go over several lines with line breaks, it will be turned into a contiguous paragraph element.</p><p>You can force a linebreak in your paragraph text<br/>thusly.</p><ul><li>a list element<ul><li>sub list element</li></ul></li><li>2nd list element</li></ul><pre>pre formatted text
<p>Taken from <ahref="https://github.com/jashkenas/coffee-script/blob/master/test/literate.litcoffee">https://github.com/jashkenas/coffee-script/blob/master/test/literate.litcoffee</a></p>
<p><ahref="Home">» JRuby Project Wiki Home Page</a>
2
-
</p><h1>Embedding JRuby</h1>
1
+
<p><a>» JRuby Project Wiki Home Page</a>
2
+
<h1>Embedding JRuby</h1>
3
3
Using Java from Ruby is JRuby's best-known feature---but you can also go in the other direction, and use Ruby from Java. There are several different ways to do this. You can execute entire Ruby scripts, call individual Ruby methods, or even implement a Java interface in Ruby (thus allowing you to treat Ruby objects like Java ones). We refer to all these techniques generically as "embedding." This section will explain how to embed JRuby in your Java project.
4
-
5
-
<p></p><tablesummary="Contents"><tr><td>
6
-
<div><h2>Table of Contents</h2></div>
4
+
</p>
5
+
<p><tableid="toc"summary="Contents"><tr><td>
6
+
<divid="toctitle"><h2>Table of Contents</h2></div>
7
7
<ul>
8
8
<li>
9
9
<ahref="#Red_Bridge_JRuby_Embed">Red Bridge (JRuby Embed)</a><ul><li><ahref="#Features_of_Red_Bridge">Features of Red Bridge</a></li></ul>
<p>JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the <ahref="DirectJRubyEmbedding">legacy API</a> should still work, but we strongly recommend Red Bridge for all new projects.
24
+
<pre>a-b</pre>
25
+
</p>
26
+
<p>JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the <a>legacy API</a> should still work, but we strongly recommend Red Bridge for all new projects.
27
27
</p>
28
28
29
29
<h2>
30
-
<aname="Features_of_Red_Bridge"></a>Features of Red Bridge
30
+
<aname="Features_of_Red_Bridge"></a><spanid="Features_of_Red_Bridge">Features of Red Bridge</span>
31
31
</h2>
32
32
33
33
34
-
<p>Red Bridge consists of two layers: Embed Core on the bottom, and implementations of <ahref="http://www.jcp.org/en/jsr/detail?id=223"target="_blank">JSR223</a> and <ahref="http://jakarta.apache.org/bsf/" target="_blank">BSF</a> on top. Embed Core is JRuby-specific, and can take advantage of much of JRuby's power. JSR223 and BSF are more general interfaces that provide a common ground across scripting languages.
34
+
<p>Red Bridge consists of two layers: Embed Core on the bottom, and implementations of <ahref="http://www.jcp.org/en/jsr/detail?id=223">JSR223</a> and <ahref="http://jakarta.apache.org/bsf/">BSF</a> on top. Embed Core is JRuby-specific, and can take advantage of much of JRuby's power. JSR223 and BSF are more general interfaces that provide a common ground across scripting languages.
35
35
</p>
36
36
<p>Which API should you use? For projects where Ruby is the only scripting language involved, we recommend Embed Core for the following reasons:
37
37
</p>
38
38
39
39
40
40
41
-
<p></p><ol>
41
+
<p><ol>
42
42
<li>With Embed Core, you can create several Ruby environments in one JVM, and configure them individually (via <code>org.jruby.RubyInstanceConfig</code>. With the other APIs, configuration options can only be set globally, via the <code>System</code> properties.</li>
43
43
<li>Embed Core offers several shortcuts, such as loading scripts from a <code>java.io.InputStream</code>, or returning Java-friendly objects from Ruby code. These allow you to skip a lot of boilerplate.</li>
44
44
</ol>
45
45
For projects requiring multiple scripting languages, JSR223 is a good fit. Though the API is language-independent, JRuby's implementation of it allows you to set some Ruby-specific options. In particular, you can control the threading model of the scripting engine, the lifetime of local variables, compilation mode, and how line numbers are displayed.
46
-
47
-
<p>The full <ahref="http://jruby-embed.kenai.com/docs/"target="_blank">API documentation</a> has all the gory details. It's worth talking about a couple of the finer points here.
46
+
</p>
47
+
<p>The full <ahref="http://jruby-embed.kenai.com/docs/">API documentation</a> has all the gory details. It's worth talking about a couple of the finer points here.
<p>We recommend using Embed Core; however, if you're maintaining code that uses the old API, you can find its documentation on the <ahref="JavaIntegration">legacy embedding</a><sup>[<ahref="#cite_note-1">1</a>]</sup> page.
55
+
<p>We recommend using Embed Core; however, if you're maintaining code that uses the old API, you can find its documentation on the <a>legacy embedding</a><supid="cite_ref-1-0">[<ahref="#cite_note-1">1</a>]</sup> page.
0 commit comments