Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: DT
Type: Package
Title: A Wrapper of the JavaScript Library 'DataTables'
Version: 0.9.1
Version: 0.9.2
Authors@R: c(
person("Yihui", "Xie", email = "[email protected]", role = c("aut", "cre")),
person("Joe", "Cheng", role = "aut"),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGES IN DT VERSION 0.10

## BUG FIXES

- Fix the issue that `styleEqual()` doesn't work expectedly for values contain special HTML character like `>` or `<` (thanks, @hjia222 #723).

# CHANGES IN DT VERSION 0.9

Expand Down
4 changes: 4 additions & 0 deletions R/format.R
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,10 @@ styleEqual = function(levels, values, default = NULL) {
if (!is.null(default) && (!is.character(default) || length(default) != 1))
stop("default must be null or a string")
if (n == 0) return("''")
# because the data will be transformed by escapeData(), we need to compare
# the "escaped value" of the "levels" instead of the raw value
if (is.character(levels) || is.factor(levels))
levels = htmlEscape(levels)
levels = jsValues(levels)
values = jsValues(values)
js = ''
Expand Down