|
|
Joined: Oct 2001
Posts: 13
Junior Member
|
Junior Member
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.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
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. 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.
|
|
|
|
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
Joined: Nov 2001
Posts: 1,080 |
I'm guessing both since the edited post and text area displays HTML raw code (e.g., 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.
|
|
|
|
Joined: Oct 2001
Posts: 13
Junior Member
|
Junior Member
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.
|
|
|
|
Joined: Nov 2001
Posts: 1,704
Moderator / Da Masta
|
Moderator / Da Masta
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
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
Joined: Nov 2001
Posts: 1,080 |
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. 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.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
Joined: Nov 2001
Posts: 1,080 |
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. 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.
|
|
|
|
Joined: Oct 2001
Posts: 13
Junior Member
|
Junior Member
Joined: Oct 2001
Posts: 13 |
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.
|
|
|
|
Joined: Nov 2001
Posts: 1,080
Member
|
Member
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: 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. It's quite an extensive solution but it works.
|
|
|
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.
|
|
Posts: 21,079
Joined: March 2000
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|