]> git.donarmstrong.com Git - xtable.git/commitdiff
Fixed bug #2795
authordscott <dscott@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Wed, 28 Aug 2013 00:39:41 +0000 (00:39 +0000)
committerdscott <dscott@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>
Wed, 28 Aug 2013 00:39:41 +0000 (00:39 +0000)
git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@41 edb9625f-4e0d-4859-8d74-9fd3b1da38cb

pkg/DESCRIPTION
pkg/NEWS
pkg/R/print.xtable.R
pkg/inst/doc/margintable.pdf [new file with mode: 0644]
pkg/inst/doc/xtableGallery.pdf [new file with mode: 0644]

index ae32544c8fc5ab34bc1755bb994472281c24bd83..58354a30106532cf9163e4fa441e1bff721dbf1a 100644 (file)
@@ -1,6 +1,6 @@
 Package: xtable
-Version: 1.7-1
-Date: 2012/08/10
+Version: 1.7-2
+Date: 2013/08/28
 Title: Export tables to LaTeX or HTML
 Author: David B. Dahl <dahl@stat.tamu.edu>
 Maintainer: Charles Roosen <statsci@gmail.com>
index 0a7101592a6648f6bdf9cf087c3962d7775c92b8..12d00d938f06e069f43257525c2a19a2efeef01c 100644 (file)
--- a/pkg/NEWS
+++ b/pkg/NEWS
@@ -1,3 +1,6 @@
+1.7-2 (NOT YET RELEASED)
+  * Fixed HTML gsub bug (#2795)
+
 1.7-1 (2013-02-24)
   * Fixed logicals bug (Req #1911)
   * Changed implementation of centering of tables. Instead of
index 0060222bae9236e666b613c2a3d152675ee2d49c..35d4c4611bcce6ae00f3d7bd2edf885ac3fbf54c 100644 (file)
@@ -423,9 +423,15 @@ print.xtable <- function(x,
         ETD  <- " </TD>"\r
         sanitize <- function(str) {\r
             result <- str\r
-            result <- gsub("&", "&amp ", result, fixed = TRUE)\r
-            result <- gsub(">", "&gt ", result, fixed = TRUE)\r
-            result <- gsub("<", "&lt ", result, fixed = TRUE)\r
+            ## Changed as suggested in bug report #2795\r
+            ## That is replacement of "&" is "&amp;"\r
+            ## instead of previous "&amp" etc\r
+            ## result <- gsub("&", "&amp ", result, fixed = TRUE)\r
+            ## result <- gsub(">", "&gt ", result, fixed = TRUE)\r
+            ## result <- gsub("<", "&lt ", result, fixed = TRUE)\r
+            result <- gsub("&", "&amp;", result, fixed = TRUE)\r
+            result <- gsub(">", "&gt;", result, fixed = TRUE)\r
+            result <- gsub("<", "&lt;", result, fixed = TRUE)\r
             ## Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> on 2006/10/05\r
             ## recommended not escaping underscores.\r
             ## result <- gsub("_", "\\_", result, fixed=TRUE)\r
diff --git a/pkg/inst/doc/margintable.pdf b/pkg/inst/doc/margintable.pdf
new file mode 100644 (file)
index 0000000..6644c4d
Binary files /dev/null and b/pkg/inst/doc/margintable.pdf differ
diff --git a/pkg/inst/doc/xtableGallery.pdf b/pkg/inst/doc/xtableGallery.pdf
new file mode 100644 (file)
index 0000000..029f97f
Binary files /dev/null and b/pkg/inst/doc/xtableGallery.pdf differ