TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: Skhilled on December 10, 2008, 09:23:20 PM

Title: [bugtracker] Article bug when code is inserted
Post by: Skhilled on December 10, 2008, 09:23:20 PM
Actually, this is for smf 1.1.7 but there is no listing for it in the dropdown. I've not tested this with smf 1.1.6.

This bug appears whether using the editor during article creation or not.

I tried to add code to an article using the code or quote tags (works using both) and get missing code and some parts showing completely outside of the article...above and to the right of it. The code I was using was the calendar button code from index.template.php, the default.

 // The [calendar]!
 if ($context['allow_calendar'])
  echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
    <td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
     <a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
    </td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';

No matter how I use the article, php, html, or bbc....with or without the editor this happens. Some code seems to work ok but others not. I am assuming that it has something to do with links and the <a href> tag. After I save it it shows this part of the code as a link "
' , $txt['calendar24'] , ' ".

Code added without any links ("a href" or otherwise) seem to work fine.
Title: Re: [bugtracker] Article bug when code is inserted
Post by: G6Cad on December 10, 2008, 09:26:23 PM
The editors have been replaced for the next release, there will be a diffrent lightweight editor instead of wysiwyg and FCKeditor
Title: Re: [bugtracker] Article bug when code is inserted
Post by: Skhilled on December 10, 2008, 09:30:41 PM
Ah, so this is actually an editor problem even though it the editor is turned off?
Title: Re: [bugtracker] Article bug when code is inserted
Post by: G6Cad on December 10, 2008, 09:43:17 PM
Cant reallt say, but there were quite a lot of issues with the editors, ecoding, languages etc regarding the old ones  :-\
Title: Re: [bugtracker] Article bug when code is inserted
Post by: IchBin on December 10, 2008, 10:04:23 PM
I'm not sure this has to do with the editors. If you were to post that code into an article without making it use a proper table, that would can screw up the whole forum. That button code in your first post is not a complete HTML table. Perhaps its the code you're putting in your article? Which is why some work, and some don't.
Title: Re: [bugtracker] Article bug when code is inserted
Post by: Skhilled on December 11, 2008, 03:01:14 PM
Yeah, that's what I thought but it was puzzling since even in a "code" or "quote" tag it did the same. I just might have to either fake a html page code for it or just use an image of the code for now.

I'll have to do a few tests and hopefully can find a workaround for it. Thanks you 2. :)
Title: Re: [bugtracker] Article bug when code is inserted
Post by: bloc on December 12, 2008, 08:18:50 PM
- Add htmlentities() to fetched body text of articles, for TPv1.0 beta3

It was not to do with editor, rather the quote symbols in the code pulled it out of the normal PHP flow. Now converted with htmlentities upon fetching.
Title: Re: [bugtracker] Article bug when code is inserted
Post by: Skhilled on December 19, 2008, 07:48:28 AM
Thanks Bloc. I'll try that. :)