- Moderated by:
- Support Team
-
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Hello,
pnForum question:
I'm seeing some garbled output on forum pages... it happens in all forums and with different themes... in essence the HTML is showing up. This is what I get, althought the first two levels correctly show up as HTML formatted text, the third level seems to BE text and includes the HTML :
Start :: Software Support :: < STRONG>Christmas Adventure< /FONT>< /STRONG>
NOTE: I had to add the spaces in the strong and font commands to prevent formatting in this message
Is there a hack, fix or update that gets rid of this annoying bug in pnForum.. I don't see it elsewhere?
THANKS
Montie
-
- rank:
-
Professional
- registered:
- February 2005
- Status:
- offline
- last visit:
- 09.04.08
- Posts:
- 1480
First thought - check PN Admin -> Settings -> HTML to see if the tags are permitted with attributes and change as needed/appropriate.
--
Peace
______________________________________
The commonest cause of problems is solutions. -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
In addition to the advice provided so far make sure that the HTML used is valid XHTML otherwise PN's HTML parser will reject it. In the sample you've provided you've got a stray closing font tag and the tags are upper case - XHTML is all lowercase.
-Mark -
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Hi and thanks for the reply.
The HTML attributes (for < STRONG> and < FONT>) are so set. Note that even though you can't really see it in the original post... the first two levels of forums are displayed properly... (large font) only the sub-forum on that line is displayed incorrectly. It is not the forum name, since all forums at this level show this error, and only at this level nowhere else.
I failed to mention I'm running PostNuke .762 and pnForum 2.6 and it's all a fresh install... everything working fine all around. Only this little nagging garble.
I'm guessing (heavy on the guess) it's a typo in the PHP page that generates/displays forums at this level... it's only part of the displayed line that's erronious (showing tags). If tags aren't used in the forum title, it wouldn't show up either...
I might be able to fix it if I knew where to look...
PEACE right back at ya!
edited by: Montie, Jun 21, 2006 - 12:08 PM -
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Hi Mark,
I tried your suggestion but there was no effect. Take a look at it if you have a moment, you can see as you navigate the forums that all names display correctly except when viewed at the sub-forum level, the sub-forum name is garbled... the sub-forum and only the sub-forum, there and only there. Very strange... (and maybe I should be calling it 'unformatted' as opposed to garbled?)
Montie
-
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
Looks like there's a minor bug in one of the pnForum templates. Edit the template modules/pnForum/pntemplates/pnforum_user_viewforum.html.
Locate the code
Code
<!--[ $forum.forum_name|pnvarprepfordisplay ]--></strong><br />
and change it too one of the following
Code
<!--[ $forum.forum_name|pnvarprephtmldisplay ]--></strong><br />
or
Code
<!--[ $forum.forum_name ]--></strong><br />
The first solution changes the HTML formatting from using pnVarPrepForDisplay (which strips all HTML) to pnVarPrepHTMLDisplay (which applies the standard XHTML filter and is subject to the allowed HTML tags in the admin panel). The second solution removes any attempt to filter the text and displays the text as-is. If you are in complete control of the forum setup i.e. only you or other trusted indivuduals control the forum structure then option two may be easier/better.
You might find the docs on Templating Basics useful.
-Mark -
- rank:
-
Professional
- registered:
- November 2003
- Status:
- online
- Posts:
- 1675
Actually you should call it 'formatted as text' since it's being rendered as <strong> etc... does it look like that in the template?
Also size has an unquoted attribute eg. font=5, on top of that I don't believe that 'font' is valid XHTML anyways, you should be using style sheets for that.
Have you tried turning off safehtml in Admin/System/Settings?
--
Under Construction! -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
The font tag is valid only in transitional doctypes - not even in HTML strict. Under XHTML the attributes should be quoted i.e.
Code
<tag attributename="parametervalue">....</tag>
The use of font tags isn't recommeded since it breaks the seperation of content and layout. Layout is described using CSS.
-Mark -
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Mark,
Those changes worked perfectly !!!
(I chose the first, no further changes required)
YOU DA MAN !
Thank you very sincerely for your help and also everyone who posted! I learned a lot from this thread.
Montie
ps I MUST comment on the BLAZING speed answers came forth on this forum KUDOS.
edited by: Montie, Jun 21, 2006 - 12:08 PM -
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Well I'm back again...
After that most excellent fix was applied, I could see the screen a little more clearly, if you know what I mean. I've noticed now what might be another small bug on the same page. Under the line that was just repaired, is where the topics/post are listed... in this fashion:
Christmas Adventure :: CA Support">CA Support
Note that the post's title (CA Support) seems to repeat, seperated by "> I've seen this on all my post.
Thanks again for your time and energy!
Montie
edited by: Montie, Jun 21, 2006 - 02:17 PM -
- rank:
-
Freshman
- registered:
- June 2006
- Status:
- offline
- last visit:
- 07.01.07
- Posts:
- 25
Hi again,
I'm not trying to be difficult really, but I'm a bit confused... the tags are all working perfectly as far as I can tell... The post's title is plain text and that is what is recurring... it happens after the double colons :: that seperate sub-forum from post title. Is this still an HTML issue?
Montie
ps Oh, and it only happens on that one page (same as the other issue).
edited by: Montie, Jun 21, 2006 - 01:36 PM -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
The tags aren't working properly - only where the templates don't attempt to apply tag filtering rules. Where filtering rules are applied (and you want this in user contributed material) you must use proper XHTML tags. If you do this then all your problems will go away.
-Mark
