Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2001
Posts: 13
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 13
After installing dozens of hacks, I'm afraid that I've come across a problem that I don't know how to back-track on. The problem is that when a member edits his or her post, any UBB code that is contained in the post is converted to HTML. This would be okay if I had HTML turned on, but I don't due to security reasons.

Does anyone know the area (or line would be preferable) where this is handled in the code? Thanks a ton. smile

Sponsored Links
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
The only way I was able to resolve this was to eliminate all tags and adjoining HTML codes in the UBB code routines for the ubb_lib.cgi and ubb_lib_posting.cgi files. I haven't come across or know of any other method to get around the return routines. smile The trick is the make certain that whatever you edit in one file it must match the other or you'll get the HTML raw codes when editing. smile

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Is the HTML there as the user edits the post, i.e. the textarea contains the HTML, or does the edited post come out as HTML? If it's the former, prep_for_edit is failing... otherwise, it's the bake_post or cook_post call failing.


UBB.classic: Love it or hate it, it was mine.
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
I'm guessing both since the edited post and text area displays HTML raw code (e.g., smile

I found myself having to edit "sub reverse_ubb_code" and "sub ProcessCodeTag" for ubb_lib_posting.cgi. For ubb_lib.cgi I edited "sub UBBCode_core". After doing so the problem was resolved. smile

Joined: Oct 2001
Posts: 13
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 13
Charles, both are occurring.

Is this problem standard in all UBBs?

Thanks for the suggestion, Prime. I'll give it a try tomorrow and let you know how it works. smile

Sponsored Links
Joined: Nov 2001
Posts: 1,704
CTM Offline
Moderator / Da Masta
Moderator / Da Masta
Offline
Joined: Nov 2001
Posts: 1,704
The problem generally occurs when you install a modification that edits any of these subs. I'm putting my money on Advanced UBB Code here... If you have it installed, whose version of the hack did you use?

Joined: Oct 2001
Posts: 13
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 13
I used this one by Risperdal.

I'm assuming it won't hurt the usability of anything if I were to delete the HTML tags out of those sub procedures as Prime suggested?

Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Quote
quote:
Originally posted by CTM:
The problem generally occurs when you install a modification that edits any of these subs. I'm putting my money on Advanced UBB Code here
Maybe, but then again on a default UBB this issue can occur. smile I don't use the UBB Advanced Codes and I still get the HTML raw codes. I initially thought it was due to the "Preventing Double Quote hack" but that wasn't the case. smile

Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
Quote
quote:
Originally posted by Xiphoid:

I'm assuming it won't hurt the usability of anything if I were to delete the HTML tags out of those sub procedures as Prime suggested?
I've been doing it since 6.2.1 and never experienced any problems because of it. smile

It takes a bit of work since you need to edit quite a bit in both "ubb_lib_posting.cgi", "ubb_lib.cgi" and maybe in "ubb_new_reply.cgi" (if using Quick Reply) files. Back up any files you edit however since it may take a bit of trial and error. smile

Joined: Oct 2001
Posts: 13
Junior Member
Junior Member
Offline
Joined: Oct 2001
Posts: 13
Quote
quote:
The trick is the make certain that whatever you edit in one file it must match the other or you'll get the HTML raw codes when editing.
So I can copy the lines from ubb_lib over the ones in ubb_lib_posting (I think they're the ones that are messed up)?

I tried deleting all of the HTML stuff I saw but received an error... I probably deleted too much or too little.

Sponsored Links
Joined: Nov 2001
Posts: 1,080
Member
Member
Offline
Joined: Nov 2001
Posts: 1,080
I could be wrong but I don't think you can copy from one file to the other. You'll have to manually edit both files.

Here is an example to what I did:

Original code from UBB 6.4 in ubb_lib_posting.cgi:

Code
[/code]HTML edit:

[code]
That is just for the "old quote/code". I did this to basically every UBB Code...Only taking out the "font" tags and other codes I didn't need. laugh It's quite an extensive solution but it works. smile


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)