polytexnic 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polytexnic/postprocessors/html.rb +2 -1
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/core_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f1baad3a78ade0543d7a53668ae5b7dc4e842f8
|
4
|
+
data.tar.gz: de5c7f99ea9f3834641f65ee102bc150e093d910
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6c898e3bd84feb346bbc076fa4c249a676476114094ba0989b572779627020635b23a5edc30c2108caf115460d9d08e546fdb478442a43aa8d50ed63f04057f
|
7
|
+
data.tar.gz: 6990ff0906d2527dc5221251815ebbd7c129e32624df332693b66ed16eb91a08d61826c56b13716bc5b817cb97e414e9359414cf374e354e3181945102e08217
|
@@ -1012,7 +1012,8 @@ module Polytexnic
|
|
1012
1012
|
doc.xpath('//xref').each do |node|
|
1013
1013
|
node.name = 'a'
|
1014
1014
|
node['href'] = unescape_special_chars(literal_cache[node['url']])
|
1015
|
-
node['target'] = '_blank' #
|
1015
|
+
node['target'] = '_blank' # Open in new window/tab
|
1016
|
+
node['rel'] = 'noopener' # Make target="_blank" secure
|
1016
1017
|
# Put a class on hrefs containing TeX to allow a style override.
|
1017
1018
|
node.traverse do |descendant|
|
1018
1019
|
if descendant['class'] == 'texhtml'
|
data/lib/polytexnic/version.rb
CHANGED
data/spec/to_html/core_spec.rb
CHANGED
@@ -126,7 +126,7 @@ describe 'Polytexnic::Pipeline#to_html' do
|
|
126
126
|
should resemble <<-'EOS'
|
127
127
|
<div id="title_page">
|
128
128
|
<h1 class="title">Foo <span class="break"></span> <em>Bar</em></h1>
|
129
|
-
<h1 class="subtitle"><a href="http://example.com/" target="_blank">Baz</a></h1>
|
129
|
+
<h1 class="subtitle"><a href="http://example.com/" target="_blank" rel="noopener">Baz</a></h1>
|
130
130
|
<h2 class="author">Michael Hartl</h2>
|
131
131
|
<h2 class="date">January 1, 2013</h2>
|
132
132
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polytexnic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Hartl
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05
|
12
|
+
date: 2016-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|