Author |
Topic |
kycable
New Member
USA
82 Posts |
Posted - 20 February 2001 : 15:29:32
|
I have done a quick search for this... Although I don't know if this has brought to anyones attention. But if you change the color of the text, bold, underline, or add an image then click on the Preview button... You will see the actual HTML instead of the formatting of the post.
I looked in the pop_preview.asp file and noticed this line:
<% =formatStr(chkString(strMessagePreview,"preview")) %>
then I looked in the inc_functions.asp file and noticed there was nothing in the chkString fuction about "preview" so by changing it to:
<% =formatStr(chkString(strMessagePreview,"message")) %>
Allows the preview to work properly. (I checked it here too, it does the samething )
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 15:37:18
|
you're absolutely correct.
Mike,
I changed this in the forum_new code, it seems to work OK, I did wonder why the preview didn't work any more.
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 15:47:56
|
it also affect IE as well as netscape as mentioned in the other topic. The fix seems to work. If you look at the forum_new Richard, you can test it
|
|
|
kycable
New Member
USA
82 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 February 2001 : 16:04:38
|
The fixed inc_functions.asp that was on the forum before it went down, was just overwritten with a non-fixed (at least for the preview bug) inc_functions.asp. It just hasn't be re-fixed yet.
What fix did you apply? If you changed "preview" to "message" then it really needs to be fixed so the "preview" can be used as it was intended.
Which was to add this:
elseif fField_Type = "preview" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if
below this:
elseif fField_Type = "message" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 16:14:51
|
then there is something else wrong, the code already contains those lines in inc_functions, but if you change pop_preview back to "preview" it no longer works correctly if you change it to message it works OK.
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 16:19:37
|
I think the code you say should be inserted, should actually be removed at the top of chkString it does
if fField_Type = "title" or _ fField_Type = "preview" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if ChkBadWords(fString) ChkString = fString exit function end if
so if field_type = "preview", it is HTMLencoded twice. where as message is only coded once
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 February 2001 : 16:23:03
|
Is it placed above the docode section or below. If it's below then it needs to be moved above. If you take a look at the inc_functions.asp that is in the latest alpha, you'll see what I mean. It works in that one, just not the one that is currently being used on this forum.
here is a link to the bug report: http://forum.snitz.com/forum/link.asp?TOPIC_ID=3299 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 16:27:42
|
the code at forum_new is the alpha code yes?
it does not work there
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 February 2001 : 16:27:46
|
the part with the "title" was added to one of the alphas, and as far as I know, wasn't applied to the support forum yet. |
|
|
Reinsnitz
Snitz Forums Admin
USA
3545 Posts |
Posted - 20 February 2001 : 16:29:01
|
this was fixed in the alphas right? am I losing my mind?
Reinsnitz (Mike) ><)))'> "Therefore go and make disciples of all nations,..." Matthew 28:19a |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 February 2001 : 16:33:09
|
In the very latest alpha,
this:
elseif fField_Type = "preview" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if
should have been replaced by this:
if fField_Type = "title" or _ fField_Type = "preview" then if strAllowHTML <> "1" then fString = HTMLEncode(fString) end if ChkBadWords(fString) ChkString = fString exit function end if
but right now we are talking about the version that is on the support forum and it didn't have the part about the "title" in it yet. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 20 February 2001 : 16:36:52
|
then I am now confused, both the apha version I have on my machine, and the inc_functions which is at http://forum.snitz.com/forum_new have both these pieces of code. and both do not display the preview correctly.
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 20 February 2001 : 16:41:14
|
Can someone either e-mail me, or post the inc_functions.asp that is being used on the support forum right now? |
|
|
Topic |
|