Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.11
Component:
Views Data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2010 at 05:20 UTC
Updated:
16 Aug 2010 at 06:46 UTC
I saw mentions elsewhere in the views issue queue about ampersands but I didn't see this particular issue. If a field trim happens in the middle of a URL with an ampersand in it, HTML corrector breaks.
Example URL (note this a computed field which is outputting html with a url in it):
http://www.allmusic.com/cg/amg.dll?p=amg&sql=10:fbfwxzqgldje
Settings as follows:
Trim this field to a maximum length:
Yes
Trim only on a word boundary:
Yes
Add an ellipsis:
Yes
Field can contain HTML:
Yes
Strip HTML tags:
No
Resultant HTML:
<td class="views-field views-field-field-url-value">
<a href="http://www.allmusic.com/cg/amg.dll?p=amg... </td>
Decrease the maximum length by 5 characters and it still cuts in the same place:
<td class="views-field views-field-field-url-value">
<a href="http://www.allmusic.com/cg/amg.dll?p=amg... </td>
Comments
Comment #1
dawehnerIf this does not work then it's a drupal core bug. At the end of this function views uses _filter_htmlcorrector, which is somehow broken in d6.
Do you use drupal 6.11? I think there was a fix in
Comment #2
dawehnerIf this does not work then it's a drupal core bug. At the end of this function views uses _filter_htmlcorrector, which is somehow broken in d6.
Do you use drupal 6.11? I think there was a fix in
Comment #3
silentway commentedI've got core 6.17. Let me know if there's any other info I can report to help. Or, if it should be in a different issue queue. Cheers,
Comment #4
esmerel commentedComment #5
merlinofchaos commentedAttempting to use the shorten on a field that is entirely an a tag isn't going to work right in any case.
The corrector is attempting not to break
&created entities. Since it's inside the tag it shouldn't be looking at it, but the problem is pretty minor, since even if it worked, what you'd get is an empty string if it cut, since it would be forced to cut the entire<a>tag.