File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ CLASS cl_abap_dyn_prg IMPLEMENTATION.
7777 ENDMETHOD .
7878
7979 METHOD escape_quotes_str .
80- ASSERT 1 = 'todo' .
80+ out = val.
81+ REPLACE ALL OCCURRENCES OF '`' IN out WITH '``' .
8182 ENDMETHOD .
8283
8384 METHOD check_table_or_view_name_str .
@@ -103,7 +104,8 @@ CLASS cl_abap_dyn_prg IMPLEMENTATION.
103104 ENDMETHOD .
104105
105106 METHOD escape_quotes .
106- ASSERT 1 = 'todo' .
107+ out = val.
108+ REPLACE ALL OCCURRENCES OF `'` IN out WITH `''` .
107109 ENDMETHOD .
108110
109111 METHOD escape_xss_xml_html .
Original file line number Diff line number Diff line change 1+ CLASS ltcl_dyn_prg DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL .
2+
3+ PRIVATE SECTION .
4+ METHODS escape_quotes1 FOR TESTING RAISING cx_static_check.
5+ METHODS escape_quotes_str1 FOR TESTING RAISING cx_static_check.
6+
7+ ENDCLASS .
8+
9+ CLASS ltcl_dyn_prg IMPLEMENTATION .
10+ METHOD escape_quotes_str1 .
11+ cl_abap_unit_assert=>assert_equals(
12+ act = cl_abap_dyn_prg=>escape_quotes_str( 'hello ` world' )
13+ exp = 'hello `` world' ).
14+ ENDMETHOD .
15+
16+ METHOD escape_quotes1 .
17+
18+ cl_abap_unit_assert=>assert_equals(
19+ act = cl_abap_dyn_prg=>escape_quotes( `hello ' world` )
20+ exp = `hello '' world` ).
21+
22+ ENDMETHOD .
23+
24+ ENDCLASS .
You can’t perform that action at this time.
0 commit comments