One of my views blocks includes a node:body field.

One node contained a link which was trimmed in half:

More info se, <a edit="" src="www....</p></div> </div> </td> </tr> </tbody> </table> </div> </div> </div> <div class="/>

The result wrecked complete havoc on my frontside. "Field can contain HTML" is checked. I don't know if this is a issue for HTML corrector or Views.

Please let me know if I have to specify the problem more...

Comments

serg.remote’s picture

Hi,

here's how it works for me on the 6.x-2.3.

Source node text (part):
--

<table border="0" class="tabled" align="left">
	
		<tr>
			<td align="center"> </td>
			<td align="center">

			<strong>
			Bailout<br />
			Principal
			</strong>
			</td>
			<td align="center"><strong>Retooling<br />
			Principal<br />
			</strong>

			</td>
			<td align="center"><strong>Bailout<br />
			interest<br />
			</strong>
			</td>

--

Below is the node body with 200 as a maximum lenght, 'Trim only on a word boundary' checked and 'Field can contain HTML' unchecked:
--<table border="0" class="tabled" align="left...
--
Checking 'Field can contain HTML' doesn't affect the result.
I actually thought that if it's unchecked then HTML is completely stripped and (in the best case) it's not counted in maximum lenght.

I'm not sure if it's really a bug but if not - please explain how should it behave.

Thanks!

UPD.: http://drupal.org/node/379382 seem to do the job but it seems that it's what 'Field can contain HTML' should do when not checked.

greenbeans’s picture

I'm having this same problem. Has anyone found a solution?

serg.remote’s picture

Check http://drupal.org/node/379382
'Field can contain HTML' is not a switch that shows/removes HTML (despite it's dualistic name). To remove HTML from the text you have to use patch from the link above

greenbeans’s picture

I don't want it to remove HTML, just to properly close open tags, like the description suggests.

serg.remote’s picture

IIRC it's a corrector issue

greenbeans’s picture

What do you mean by corrector?

serg.remote’s picture

I mean HTML corrector. If "Field can contain HTML" is checked the following is run:

if (!empty($this->options['alter']['html'])) {
      $value = _filter_htmlcorrector($value);
}
greenbeans’s picture

Status: Active » Closed (fixed)

Ah, thanks. Guess I'd better file a bug against that, then.

merlinofchaos’s picture

Please note that HTML corrector doesn't deal correctly with broken HTML. However, a patch to -dev went in a few weeks ago that should help prevent that from happening, but I believe the <img> tag has shown us that it needs to be a little more aggressive.