File: proper_variable_escaping.patch

package info (click to toggle)
html2ps 1.0b7-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 2,200 kB
  • sloc: perl: 4,539; tcl: 1,799; makefile: 1
file content (60 lines) | stat: -rw-r--r-- 1,440 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From: Trent Buck <trentbuck@gmail.com>
Last-Update: 2007-04-29
Description: Correctly quoting of paper configuration
 The paper type wasn't set correctly even after using paperconf because
 certain variables weren't correctly escaped and EOR wasn't correctly
 quoted. This patches fixes that.

diff --git a/html2ps b/html2ps
index 51a60b6..c941b2c 100755
--- a/html2ps
+++ b/html2ps
@@ -30,8 +30,8 @@ $globrc='/it/sw/share/www/lib/html2ps/html2psrc';
 $ug='/it/sw/share/www/lib/html2ps/html2ps.html';
 $default_paper=`paperconf` || 'a4';
 
-$conf=<<'EOR';
-@html2ps {
+$conf=<<"EOR";
+\@html2ps {
   package {
     PerlMagick: 0;
     ImageMagick: 0;
@@ -90,7 +90,7 @@ $conf=<<'EOR';
     middle: 2cm;
   }
   xref {
-    text: "[p $N]";
+    text: "[p \$N]";
     passes: 1;
   }
   quote {
@@ -137,8 +137,8 @@ $conf=<<'EOR';
   }
   titlepage {
     content: "<DIV align=center>
-      <H1><BIG>$T</BIG></H1>
-      <H2>$[author]</H2></DIV>";
+      <H1><BIG>\$T</BIG></H1>
+      <H2>\$[author]</H2></DIV>";
     margin-top: 4cm;
   }
   font {
@@ -270,7 +270,7 @@ $conf=<<'EOR';
     fuchsia: FF00FF;
     aqua: 00FFFF;
   }
-  html2psrc: "$HOME/.html2psrc";
+  html2psrc: "\$HOME/.html2psrc";
   imgalt: "[IMAGE]";
   datefmt: "%e %b %Y  %R";
   locale: "";
@@ -346,7 +346,7 @@ DEL { text-decoration: line-through }
 
 A:link, HR { color: black }
 
-@page {
+\@page {
   margin-left: 2.5cm;
   margin-right: 2.5cm;
   margin-top: 3cm;