Skip to content

Commit

Permalink
Implement #127
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Aug 8, 2023
1 parent dfe3d06 commit e10da58
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions R/writeODS.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
}

.escape_xml <- function(x) {
x_utf8 <- stringi::stri_enc_toutf8(x)
x_no_amp <- stringi::stri_replace_all_fixed(str = x_utf8, pattern = c("&"), replacement = c("&amp;"), vectorize_all = FALSE)
stringi::stri_replace_all_fixed(str = x_no_amp, pattern = c("\"", "<", ">", "'"), replacement = c("&quot;", "&lt;", "&gt;", "&apos;"), vectorize_all = FALSE)

stringi::stri_replace_all_fixed(str = stringi::stri_enc_toutf8(x), pattern = c("&", "\"", "<", ">", "'"), replacement = c("&amp;", "&quot;", "&lt;", "&gt;", "&apos;"), vectorize_all = FALSE)
}

.cell_out <- function(type, value, con, write_empty_cell = FALSE) {
Expand Down

0 comments on commit e10da58

Please sign in to comment.