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

archetwist - March 29, 2007 - 20:20
Category:bug report» support request

I think it's because Texy restricts the use of HTML tags to safe ones ($safeTags variable inside the html-tag.php file). So it's not a matter of the Texy! module but Texy! itself (the core).

#2

havran - March 30, 2007 - 09:06

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

anantagati - April 3, 2007 - 13:39
Title:Videos from YouTube are not shown» Tags for disable Texy! don't work properly
Category:support request» bug report

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

havran - April 4, 2007 - 18:17

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

havran - April 4, 2007 - 18:49

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

havran - April 4, 2007 - 21:18
Category:bug report» feature request

Texy author (DGX) give me this explanation (my bad english translation, sorry :-)):

Tag for disabling Texy /---html only disabling Texy syntax, not Texy processing HTML code... Texy aim is produce valid output. Tag 'embed' is realy does not exist in any HTML specification. For this reason Texy process this tag...

Solutions:

* version 1.1 - use code modification as you suggested
* in Texy 1.2 - is possible integrate tag 'embed' through code TexyHtml::$valid['embed'] = TRUE;
* in Texy 2 is there switch Texy::$strictDTD = FALSE;

Dgx

For this I think - feature request - is better for this issue...

#7

anantagati - April 5, 2007 - 13:34

Thank you for explanation.

#8

archetwist - November 16, 2007 - 00:31
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.