Skip to content

Commit 9af87c9

Browse files
replacing HTML markup with escaped characters
1 parent 28b6062 commit 9af87c9

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

doc/python/dropdowns.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -504,38 +504,40 @@ with open(output_html_path, "w", encoding='utf-8') as output_file:
504504

505505
#### Jinja HTML Template
506506

507+
<!-- #region -->
508+
507509
```
508-
<!DOCTYPE html>
509-
<html lang="en">
510-
<head>
511-
<meta charset="UTF-8">
512-
513-
</head>
514-
<body>
515-
<div class="container">
516-
<h1>Select an analysis</h1>
517-
<select id="dropdown" class="form-control">
510+
&lt;!DOCTYPE html&gt;
511+
&lt;html lang="en"&gt;
512+
&lt;head&gt;
513+
&lt;meta charset="UTF-8"&gt;
514+
515+
&lt;/head&gt;
516+
&lt;body&gt;
517+
&lt;div class="container"&gt;
518+
&lt;h1&gt;Select an analysis&lt;/h1&gt;
519+
&lt;select id="dropdown" class="form-control"&gt;
518520
{{ dropdown_entries }}
519-
</select>
521+
&lt;/select&gt;
520522
521523
522524
{{ divs }}
523525
524-
</div>
526+
&lt;/div&gt;
525527
526-
<script>
528+
&lt;script&gt;
527529
document.getElementById('dropdown').addEventListener('change', function() {
528530
const divs = document.querySelectorAll('.content-div');
529-
divs.forEach(div => div.style.display = 'none');
531+
divs.forEach(div =&gt; div.style.display = 'none');
530532
531533
const selectedDiv = document.getElementById(this.value);
532534
if (selectedDiv) {
533535
selectedDiv.style.display = 'block';
534536
}
535537
});
536-
</script>
537-
</body>
538-
</html>
538+
&lt;/script&gt;
539+
&lt;/body&gt;
540+
&lt;/html&gt;
539541
```
540542

541543

0 commit comments

Comments
 (0)