Closed (fixed)
Project:
Content Templates (Contemplate)
Version:
5.x-2.02
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 May 2008 at 15:44 UTC
Updated:
26 Jun 2008 at 13:50 UTC
Comments
Comment #1
jrglasgow commentedOne of your problems is you are using the
<i>italics tag. The "Filtered HTML" that is default with Drupal installations will not use the<i>tag. Instead use the<em>Emphasis tag. If you will notice the<em>tag is included as one of those allowed in these comments(look below the comment field).You are calling check_markup() and not giving it a format, thus check_markup() uses the default "Filtered HTML" which disallows the
<i>tag.The use of check_plain() is also causing a problem. check_plain(), according to the definition, is there to:
This means that the tags that would normally cause something to display as HTML will be specially encoded so they are only displayed and not actually used as tags, because this could lead to Cross Site Scripting.
Your best bet would be to either use check_markup() with
<em>something</em>instead of<i>something</i>, or use check_markup with the "Full HTML" filter like thisby default the filter format #2 is "Full HTML"
Comment #2
faunapolis commentedGot it, thank you very much. I thought contentplate would take the filter format selected when entering the node. I understand that you have control of that in the actual template with the number at the end of the print command.
Comment #3
glass.dimly commentedHello,
jrglasgow: This was a well-considered response to a question. Also, Contemplate is awesome. Thanks, Drupal is better for it.
So.... I have another question. I have the same problem, that html tags are being printed. I tried this;
<?php print check_markup($node->field_bibliographic_citation_if[0]['view'], 2) ?>I am using and admin account where the role "admin" has access to the filter "Full HTML". I've also tried my default filter "Rich Text", which, from the database, I know to be #4, and is correctly displaying the body field just above which includes markup.
Thanks much,
jmjohn
Comment #4
glass.dimly commentedOK,
I can answer my own question. I changed the CCK Field type from taking "Plain Text" to "Filtered Input".
Because it was a Plain Text field that was greater than 2 rows, FCKeditor was invoked, which resulted in HTML output, while the field type was set to plain text.
So, apparently, if a field is Plain Text, you can't run check_markup() on it. Weird. Is this really true, or should I file some sort of bug somewhere? Advice?
Feel free to mark this closed if you don't have any advice.
-jmjohn
Comment #5
jrglasgow commentedI really can't say that I have any advice, FCKeditor just takes an text area and creates the HTML. I guess you could post a bug report with FCKeditor, I don't know, though, how they would check the CCK field type.