Commit fd7a30c
committed
Sanitize summary field in search results
Why are these changes being introduced:
* Some summaries had HTML tags that were being rendered as text in
the search results. Sanitizing the summary field allows certain
HTML tags to be rendered properly while stripping out potentially
harmful tags.
Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/USE-297
How does this address that need:
* Uses rails `sanitize` helper to allow certain HTML tags in the
summary field while stripping out others.
Document any side effects to this change:
* I'm using sanitize with no parameters which seems to look good.
If we find we want slightly different behavior we can dig deeper into
what tags/attributes to allow.1 parent 952d7b6 commit fd7a30c
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments