code tag

24 posts / 0 new
Last post
Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 18:10
code tag

hello
whats happening
hello

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 18:38

sidebar is fine on this thread.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 18:41

hmm pretty sure this code tag was working fine, and now its just dying -
http://libcom.org/forums/feedback/jump-straight-to-last-post?page=2#comm...

Catch have u changed input formats at all?

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 18:44

hmm I tried changing it to html code tags and now it's disappeared completely.

Try < ---code here---> betweeen the tags see if that works (might have to edit my post to see what I just typed).

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 18:49


$output = '';
$comment->new = node_mark($comment->nid, $comment->timestamp);
if ($first_new && $comment->new != MARK_READ) {
// Assign the anchor only for the first new comment. This avoids duplicate
// id attributes on a page.
$first_new = FALSE;
$output .= "\n";
}

Its parsing the html. div class shoule be in there and a close div

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 19:06

teterterterter
vvdfbdfbdfb

  $output = '';
  $comment->new = node_mark($comment->nid, $comment->timestamp);
  if ($first_new && $comment->new != MARK_READ) {
    // Assign the anchor only for the first new comment. This avoids duplicate
    // id attributes on a page.
    $first_new = FALSE;
    $output .= "<a></a>\n";
  }

bdfbdfbdfbd

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 19:07

Ok spacing seems fine, i guess it was an issue with the div.

But its still parsing some stuff - like the div stuff. But not in Felix Frosts's posts.... and hes not even using code tags

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 19:42

just had a thought - if the code filter runs after the html filter, the divs might disappear before they get displayed as code. Going to check now.

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 19:46

swapped bbcode and html filter. Might break something else of course.

Mike Harman
Offline
Joined: 7-02-06
Mar 26 2007 19:48

ahh ok, well that did something anyway.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 26 2007 22:26

Yeah looks like that did it, but broke quote styling. I can fix, i think

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 09:13

broke bold, italic and other quicktags stuff as well sad

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 27 2007 10:07

bold
italic
underline
code

Quote:
quote

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 27 2007 10:23

Hmm.

Ok why are we using rich text as an input format? Surely the default for the forums should be bbcode? No one needs to use those html tags in the forums - there are only a few which arent in bbcode anyway. Can we set default to bbcode? and then if people want to use html they can choose rich text?

Steven.'s picture
Steven.
Offline
Joined: 27-06-06
Mar 27 2007 10:39

yeah that seems fair enough.

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 15:10

yeah that'd be a lot more secure - means we need to remember what we're using when adding other content types, but news now is so preformatted that we don't even need html really.

Might need to touch up bbcode format to make sure smileys/quote works. And if we do that we should take rich text away from normal users completely so there's no options - can give it back to contribs. Means people won't be able to edit their old posts but that's not a big deal compared to security holes in rich text.

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 15:28

just realised - I'm pretty sure this just styles the code, doesn't escape it - if we install the code filter that should just work.

or < > to escape manually(edit to see)

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 27 2007 15:55
Quote:
I'm pretty sure this just styles the code, doesn't escape it

What is this?

The Html filter which is part of rich text? Whats code filter then?

This is what i see when i hit edit

Quote:
or < > to escape manually(edit to see)

Dont quite understand you...

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 16:35

ok I typed & l t ; and & g t ;

those make code escaped like:


<
<?php print "bollocks";>
>

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 16:36

Except they don't work on html, only php! sad angry

I think the html filter is fitlering out our code tags - off to check.

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 17:18

no that's not it.

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 17:30

must be the html filter stripping out the html code before it gets hit by the tag. Might have to raise an issue, or a bit of trial and error with the filter weights.

Jacques Roux's picture
Jacques Roux
Offline
Joined: 17-07-06
Mar 27 2007 17:59

i tried the trial and error, didnt realy get anywhere which is why i suggested just going for bbcode

Mike Harman
Offline
Joined: 7-02-06
Mar 27 2007 18:19

we still have to have html filter - otherwise it allows everything...