Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2018 at 15:22 UTC
Updated:
4 Oct 2018 at 05:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
drunken monkeyAre you sure the conversion to plain text only happens in the Views plugin, on output? I think that normally already occurs when the excerpt is created. Therefore, that would probably be the right moment to remove such elements’ contents.
If it’s just about
<script>tags (and maybe<style>and a few others), I think we could just add this without any configuration. It seems doubtful anyone (or, more than a handful of people) would ever actually want those elements’ contents in an excerpt.But if you also want this functionality for other tags, we’d have to add a config option for this as well.
Comment #3
borisson_Comment #4
andrewsizz commentedok, we start working on this!
Comment #5
andrewsizz commentedOk I had possibility to reproduce an issue with Search: Excerpt in views.
tags with its contentAttached patch which fix an issue, so in patch we remove
Comment #6
andrewsizz commentedComment #7
drunken monkeyThanks a lot, looks good!
However, I think we can be more concise and do this with a single regexp. (Also, please no blank line at the start of the method body!)
Finally, this still needed test coverage, which I’ve also added. Patch attached, please test/review!
Comment #9
borisson_Looks great!
Comment #10
andrewsizz commentedFor me also works!
Comment #12
drunken monkeyExcellent, thanks a lot for testing/reviewing!
Committed.