Skip to content

Commit c382298

Browse files
rm html escaping of input strings
1 parent b9e798d commit c382298

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

r_regex_tester/server.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ shinyServer(function(input, output, session){
1212
input$pattern,
1313
safe_slashes(input$pattern))
1414

15-
htmltools::htmlEscape(pattern)
15+
pattern
1616
})
1717

1818
test_str = reactive({
@@ -21,8 +21,8 @@ shinyServer(function(input, output, session){
2121
test_str = ifelse("test_str" %in% input$auto_escape_check_group,
2222
input$test_str,
2323
safe_slashes(input$test_str))
24-
25-
htmltools::htmlEscape(test_str)
24+
25+
test_str
2626
})
2727

2828
match_list = reactive({

r_regex_tester/ui.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ shinyUI(
8888
HTML("<strong><font size='5'>Input</font></strong><hr>"),
8989
textInput("pattern", label="Matching Pattern", value="t(es)(t)",
9090
placeholder="Enter regex to match", width="100%"),
91-
textAreaInput("test_str", label="Test String", value="This is a test string for testing regex.",
92-
placeholder="Enter string to match regex against",width="100%")
91+
textAreaInput("test_str",
92+
label=HTML("Test String (<a href='https://stackoverflow.com/a/1732454/5731525' target='_blank'>HTML tags are not supported</a>)"),
93+
value="This is a test string for testing regex.",
94+
placeholder="Enter string to match regex against",
95+
width="100%")
9396
),
9497
bsCollapse(id = "collapseExample",
9598
bsCollapsePanel(HTML("<strong><font size='5'>Reg-Explanation</font></strong>"),

0 commit comments

Comments
 (0)