Skip to content

Commit

Permalink
Merge pull request #144 from RE-QDA/issue-143
Browse files Browse the repository at this point in the history
escape html in raw text
  • Loading branch information
hlageek authored May 19, 2024
2 parents 9e7d5bb + 2444427 commit fb05a4b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: requal
Title: Shiny Application for Computer-Assisted Qualitative Data Analysis
Version: 1.1.2.9001
Version: 1.1.2.9002
Authors@R:
c(
person(given = "Radim",
Expand Down
8 changes: 4 additions & 4 deletions R/mod_document_code_utils_document_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ load_doc_to_display <- function(pool,
blend_colors,
code_names)
)

content_df <- coded_segments %>%
dplyr::filter(segment_start <= segment_end) %>% # patch for failing calculate_code_overlap() function in case of identical code positions
dplyr::mutate(code_id = as.character(code_id)) %>%
Expand Down Expand Up @@ -363,11 +363,11 @@ load_doc_to_display <- function(pool,
content_df$position_end,
content_df$tag),
~paste0(..3,
substr(
htmltools::htmlEscape(substr(

raw_text,
..1,
..2))),
..2)))),
collapse = "") %>%
stringr::str_replace_all("[\\n\\r]",
"<span class='br'>\\&#8203</span></p><p class='docpar'>")
Expand All @@ -379,7 +379,7 @@ load_doc_to_display <- function(pool,
df_non_coded <- paste0(
"<article><p class='document_par'>",

raw_text %>%
htmltools::htmlEscape(raw_text) %>%
stringr::str_replace_all("[\\n\\r]",
"<span class='br'>\\&#8203</span></p><p class='docpar'>"),

Expand Down
Binary file added inst/app/www/favicon.ico
Binary file not shown.
Binary file modified tests/test_basic.requal
Binary file not shown.

0 comments on commit fb05a4b

Please sign in to comment.