TinyPortal
Development => Support => Topic started by: rocknroller on October 14, 2012, 04:16:52 PM
All latest versions TP and SMF.
There is issue with textarea, I mean where you need to put code for article.
If you in your custom code use form, and that form include tag textarea. It will broke the setup page.
As we know textarea form must be open and closed <textarea> </textarea>
TP recognize closing tag </textarea> from user custom form it should not be doing that.
Look at the pic.
What if you break up the textarea tag?
echo '<text'.'area>';
I think it is an old bug IIRC.
I don't know maybe you can solve it like that in php but it's also in HTML article, i had problems with it when I was migrate from SP.
First time when you paste HTML code into article it's good until you edit same article. On form below if I press save it will be broken. SP don't have that bug I don't know how they solve it.
http://www.logooff.net/index.php?page=contact
in attachment is how it is look if I edit article.
Does it do the same thing if you have the wysiwyg editor turned off?
Ah I see the problem. Too bad we didn't catch this one sooner. It'll have to be in the next release. If I get an easy enough fix I'll post the changes.
Doing something like this might give a work around until the next version.
in TPortalAdmin.php find on about line #1608
if($smcFunc['db_num_rows']($request) > 0)
{
$context['TPortal']['editarticle'] = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
}
Replace with:
if($smcFunc['db_num_rows']($request) > 0)
{
$context['TPortal']['editarticle'] = $smcFunc['db_fetch_assoc']($request);
$context['TPortal']['editarticle']['body'] = $smcFunc['htmlspecialchars']($context['TPortal']['editarticle']['body'], ENT_QUOTES);
$smcFunc['db_free_result']($request);
}
Thank you IchBin for quick support. It's really great to see that feature work. :) We use lots of custom coding on our community.
No problem. Glad it worked for you. Now I just need to figure out the best way to fix it for future. :)