[PHPTAL] html entitiy confusion

David Zülke dz at bitxtender.com
Sun Nov 18 01:12:46 CET 2007


not if you use the "structure" keyword, as described in the manual


David




Am 17.11.2007 um 20:52 schrieb Aaron Forsander:

> Thanks for the advice, that helps me clean up my code a great deal.
>
> Unfortunately,after making those changes, I still have the same issue,
> phptal converts strings to html entities.  :(
>
> - Aaron
>
>
> On Nov 17, 2007 1:29 PM, David Zülke <dz at bitxtender.com> wrote:
>> Aaron,
>>
>> 1) no need for that span element, you can loop using the div
>> 2) you're not using the "proper" way to output data, which also means
>> you cannot have the literal values printed
>>
>> Do it like this:
>>
>> <div class="comment" tal:repeat="post posts">
>>   <div class="post_author" tal:content="post/post_author">Joe Cool</
>> div>
>>   <div class="post_time" tal:content="post/post_time">February 30</ 
>> div>
>>   <div class="post_text" tal:content="structure post/post_time">Dummy
>> text here</div>
>> </div>
>>
>>
>> HTH,
>>
>> David
>>
>>
>>
>>
>> Am 17.11.2007 um 19:37 schrieb Aaron Forsander:
>>
>>
>>> I have no clue how this is going to look as I am using a lot of html
>>> here, you might need to view the email in plain text.
>>>
>>> A post looks something like this:
>>>
>>> post->id = 1
>>> post->post_time = 2007-11-16 18:14:44
>>> post->post_author = someone
>>> post->post_text = <a href="http://www.url.com"> blah </a>
>>>
>>>
>>> And I am iterating through several of these.  My phptal template  
>>> looks
>>> something like this:
>>>
>>> <span tal:repeat="post posts" tal:omit-tag="">
>>>      <div class="comment">
>>>               <div class="post_author">${post/post_author}</div>
>>>               <div class="post_time">${post/post_time} </div>
>>>               <div class="post_text">${post/post_text}</div>
>>>       </div>
>>>   </span>
>>>
>>> Currently, PHPTAL replaces
>>> post->post_text = <a href="http://www.url.com"> blah </a>
>>> with
>>> post->post_text = &lt;a href=&quot;http://www.url.com&quot;&gt; blah
>>> &lt;/a&gt;
>>>
>>>
>>> I need to display an actual working html link and not the link with
>>> html entities.
>>>
>>> Any idea how to do this?
>>>
>>>
>>>
>>> On Nov 17, 2007 12:14 PM, Levi Stanley <levi at eneservices.com> wrote:
>>>>
>>>> Hi Aaron Forsander:
>>>>
>>>> Could you post some code so I can see what you are trying to do?
>>>>
>>>> Best regards,
>>>> Levi
>>>>
>>>> Aaron Forsander wrote:
>>>> Hi everyone, I have a question about html entities and what not in
>>>> phptal.
>>>>
>>>> I have stuff in a database that contains html. When ever I output
>>>> that stuff in phptal, it converts it to html entities. I don't want
>>>> this to happen :). Is there a way I can turn off that feature, or
>>>> perhaps override it?
>>>>
>>>>
>>>> Thanks,
>>>> Aaron
>>>>
>>>> _______________________________________________
>>>> PHPTAL mailing list
>>>> PHPTAL at lists.motion-twin.com
>>>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>> Levi Stanley - <levi at eneservices.com>
>>>> Manager
>>>>
>>>> ENE Services, LLC - http://www.eneservices.com
>>>> ________________________________
>>>>
>>>> (M): 954-678-0275
>>>> (F): 866-405-9514
>>>> _______________________________________________
>>>> PHPTAL mailing list
>>>> PHPTAL at lists.motion-twin.com
>>>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>>>
>>>>
>>>
>>> _______________________________________________
>>> PHPTAL mailing list
>>> PHPTAL at lists.motion-twin.com
>>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>>
>>
>>
>> _______________________________________________
>> PHPTAL mailing list
>> PHPTAL at lists.motion-twin.com
>> http://lists.motion-twin.com/mailman/listinfo/phptal
>>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>




More information about the PHPTAL mailing list