Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow up to #269911: Search result trimming should not fall inside HTML entities/tags.
Since PHP 5.0, html_entity_decode() supports utf8 in PHP >= 5.0, so it should be possible to use that instead of decode_entities() in Drupal 7.
Comment | File | Size | Author |
---|---|---|---|
#7 | 878408-entity-decode-7.patch | 10.43 KB | pwolanin |
#5 | 878408-entity-decode.patch | 19.55 KB | Damien Tournoud |
#1 | 878408-entity-decode-1.patch | 9.09 KB | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedHere's a first quick pass. Do we want to maintain a wrapper function?
Comment #2
Dries CreditAttribution: Dries commentedThat would be lovely. Let's see what the tests will say.
Comment #4
pwolanin CreditAttribution: pwolanin commentedA the failing tests were using the exclude parameter, which the patch proposes to remove.
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedI suggest the following: keep the wrapper, as it is not trivial to get the arguments right, and rename it as drupal_html_entity_decode().
Comment #6
pwolanin CreditAttribution: pwolanin commented@DamZ - why break the API more than needed at this point? Let's not rename the function.
Comment #7
pwolanin CreditAttribution: pwolanin commentedThis is the same patch as #1 plus removing the irrelevant test case.
Comment #9
pwolanin CreditAttribution: pwolanin commentedhuh- I find it hard to believe that's a real fail.
Comment #10
pwolanin CreditAttribution: pwolanin commented#7: 878408-entity-decode-7.patch queued for re-testing.
Comment #11
moshe weitzman CreditAttribution: moshe weitzman commentedgood to go.
Comment #12
Dries CreditAttribution: Dries commentedThis looks good to go. I might add a "@todo: remove in Drupal 8" but I'm sure we'll remember to do that without the todo.
Comment #13
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.