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

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

If 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

dawehner’s picture

If 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

silentway’s picture

I'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,

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
merlinofchaos’s picture

Status: Active » Closed (won't fix)

Attempting 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.