From: dscott Date: Wed, 28 Aug 2013 00:39:41 +0000 (+0000) Subject: Fixed bug #2795 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1c96606af2cacba56b2736ee01f27e20c6fcfb7e;p=xtable.git Fixed bug #2795 git-svn-id: svn://scm.r-forge.r-project.org/svnroot/xtable@41 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- diff --git a/pkg/DESCRIPTION b/pkg/DESCRIPTION index ae32544..58354a3 100644 --- a/pkg/DESCRIPTION +++ b/pkg/DESCRIPTION @@ -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 Maintainer: Charles Roosen diff --git a/pkg/NEWS b/pkg/NEWS index 0a71015..12d00d9 100644 --- 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 diff --git a/pkg/R/print.xtable.R b/pkg/R/print.xtable.R index 0060222..35d4c46 100644 --- a/pkg/R/print.xtable.R +++ b/pkg/R/print.xtable.R @@ -423,9 +423,15 @@ print.xtable <- function(x, ETD <- " " sanitize <- function(str) { result <- str - result <- gsub("&", "& ", result, fixed = TRUE) - result <- gsub(">", "> ", result, fixed = TRUE) - result <- gsub("<", "< ", result, fixed = TRUE) + ## Changed as suggested in bug report #2795 + ## That is replacement of "&" is "&" + ## instead of previous "&" etc + ## result <- gsub("&", "& ", result, fixed = TRUE) + ## result <- gsub(">", "> ", result, fixed = TRUE) + ## result <- gsub("<", "< ", result, fixed = TRUE) + result <- gsub("&", "&", result, fixed = TRUE) + result <- gsub(">", ">", result, fixed = TRUE) + result <- gsub("<", "<", result, fixed = TRUE) ## Kurt Hornik on 2006/10/05 ## recommended not escaping underscores. ## result <- gsub("_", "\\_", result, fixed=TRUE) diff --git a/pkg/inst/doc/margintable.pdf b/pkg/inst/doc/margintable.pdf new file mode 100644 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 index 0000000..029f97f Binary files /dev/null and b/pkg/inst/doc/xtableGallery.pdf differ