TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 506
  • Total: 506

[bugtracker] Article bug when code is inserted

Started by Skhilled, December 10, 2008, 09:23:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skhilled

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.

G6Cad

The editors have been replaced for the next release, there will be a diffrent lightweight editor instead of wysiwyg and FCKeditor

Skhilled

Ah, so this is actually an editor problem even though it the editor is turned off?

G6Cad

Cant reallt say, but there were quite a lot of issues with the editors, ecoding, languages etc regarding the old ones  :-\

IchBin

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.

Skhilled

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. :)

bloc

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

Skhilled


This website is proudly hosted on Crocweb Cloud Website Hosting.