Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape html in raw text #144

Merged
merged 4 commits into from
May 19, 2024
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,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.
Loading