Tags for disable Texy! don't work properly
fxdxi - March 28, 2007 - 13:40
| Project: | Texy! |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
I Try to show directly videos from Google in TEXY! formatted content, but it doesn't work.
Instead of videos from YouTube is shown only:
</param> </param><embed src="http://www.youtube.com/v/owK5tHjL0aE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed>But on Texy Demo web page it works.
Example code which I used:
/---html
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/owK5tHjL0aE"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/owK5tHjL0aE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
\---
#1
I think it's because Texy restricts the use of HTML tags to ones (
$safeTagsvariable inside thehtml-tag.phpfile). So it's not a matter of the Texy! module but Texy! itself (the core).#2
Quick solution: in texy instalation find file texy-constants.php and edit line with
define('TEXY_BLOCK_ELEMENTS', serialize(array_flip(array('address', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', 'dl', 'dt', 'fieldset', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'iframe', 'legend', 'li', 'object', 'ol', 'p', 'param', 'pre', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul'))) );In this file missing embed (last item in next code)
define('TEXY_BLOCK_ELEMENTS', serialize(array_flip(array('address', 'blockquote', 'caption', 'col', 'colgroup', 'dd', 'div', 'dl', 'dt', 'fieldset', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'iframe', 'legend', 'li', 'object', 'ol', 'p', 'param', 'pre', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'ul', 'embed'))) );There is still text - you can delete from your code...
#3
http://texy.info/en/syntax - in Texy! syntax is said that tags '/---html' and '\---' disable Texy, so why then change something in source files in Texy?
As I see it is bug in texy.module, because when is same code used for Texy! outside Drupal it works nice and code is shown without any changes.
#4
I have tried YouTube code in http://texy.info/cs/try (here http://texy.info/cs/try/1tnfp - i think here is Texy! 2) and i get same result... I have asking Texy! author on forum.texy.info on this question.
#5
Ok, here is some answers:
Some html tags (embed) are not safe for Texy! There is possibility set some Texy! variables:
$texy->allowedTags = FALSE;
or
$texy->htmlModule->trustMode(FALSE);
and now Texy! get embed as allowed tag. There is more descriptive documentation for Texy! API but unfortunately only in Czech language. http://texy.info/cs/api-texy1 (for Texy! v 1.x now only).
#6
Texy author (DGX) give me this explanation (my bad english translation, sorry :-)):
For this I think - feature request - is better for this issue...
#7
Thank you for explanation.
#8