Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 problem with the edit_hrefs() and ReplaceURLs() fu
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

L.V.
Starting Member

Russia
16 Posts

Posted - 18 March 2006 :  21:18:57  Show Profile  Visit L.V.'s Homepage
Hello,
I have a problem with the edit_hrefs() and ReplaceURLs(ByVal strToFormat) functions :
I insert into DB the following html code:

<center><h1 style="background-image:url(http://www.boboz.us/flowers/image_data/flowers01.jpg);background-repeat:no-repeat;background-attachment:fixed;background-position:50% 50%;height:640;filter:shadow(color='darkgray')">å×Á, Ó äÎ£Í òÏÖÄÅÎØÑ!!!</h1></center>

but because of the functions the output was wrong:

<center><h1 style="background-image:url(<a href="http://www.boboz.us/flowers/image_data/flowers01.jpg" target="_blank">http://www.boboz.us/flowers/image_data/flowers01.jpg</a>);background-repeat:no-repeat;background-attachment:fixed;background-position:50% 50%;height:640;filter:shadow(color='darkgray')">å×Á, Ó äÎ£Í òÏÖÄÅÎØÑ!!!</h1></center>

That is a web-link has been created there where it hadn't been designed. I pointed the URL as image's URL for the background-image at CSS:
<h1 style="background-image:url(http://www.boboz.us/flowers/image_data/flowers01.jpg);background-repeat:no-repeat;background-attachment:fixed;background-position:50% 50%;height:640;filter:shadow(color='darkgray')">

What the changes I need to do with the functions to the trouble be solved it, but them work right for other cases?

PS
Another example of the same:

at the DB is the code:
<a href=http://www.filmkultura.iif.hu:8080/articles/films/images/angolb/3.jpg target=_blank><img src=http://images.google.com/images?q=tbn:UgA02oMprZsJ:www.filmkultura.iif.hu:8080/articles/films/images/angolb/3.jpg align=right border=0 alt="Êëèêíè, ÷òîáû ïîñìîòðåòü ôîòî Kristin Scott Thomas â ïîëíóþ âåëè÷èíó"></a>

at the output it is already corrupted with unexpected link because the function see at the URL http://images.google.com/images?q=tbn:UgA02oMprZsJ:www.filmkultura.iif.hu:8080/articles/films/images/angolb/3.jpg
www there where its coder thought it couldn't be:
<a href=http://www.filmkultura.iif.hu/articles/films/images/angolb/3.jpg target=_blank><img src=http://images.google.com/images?q=tbn:UgA02oMprZsJ:<a href="http://www.filmkultura.iif.hu:8080/articles/films/images/angolb/3.jpg" target="_blank">www.filmkultura.iif.hu:8080/articles/films/images/angolb/3.jpg</a> align=right border=0 alt="Êëèêíè, ÷òîáû ïîñìîòðåòü ôîòî Kristin Scott Thomas â ïîëíóþ âåëè÷èíó"></a>

Edited by - L.V. on 19 March 2006 18:27:42

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 19 March 2006 :  07:19:18  Show Profile  Visit Jezmeister's Homepage
Turn off forum code and turn on HTML... it's the forum code that will make the link.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 20 March 2006 :  07:37:02  Show Profile
You will need to convert your HTML to forum code in order to for it to be parsed correctly.#13;#10;#13;#10;There are many, many security risks involved with turning HTML on in your forums and should only be done if you are fully aware of these risks and, even then, only if you have a closed group of members that you can trust implicitly not to post anything malicious and that you know to be proficient enough in HTML to use such a feature.#13;#10;#13;#10;

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

L.V.
Starting Member

Russia
16 Posts

Posted - 20 March 2006 :  20:40:15  Show Profile  Visit L.V.'s Homepage
quote:
Originally posted by Jezmeister

Turn off forum code and turn on HTML... it's the forum code that will make the link.


I thought to do it (may be for a short while), but it would disable the inserting images into posts by users.

quote:
Originally posted by Jezmeister

You will need to convert your HTML to forum code in order to for it to be parsed correctly.#13;#10;#13;#10;There are many, many security risks involved with turning HTML on in your forums and should only be done if you are fully aware of these risks and, even then, only if you have a closed group of members that you can trust implicitly not to post anything malicious and that you know to be proficient enough in HTML to use such a feature.#13;#10;#13;#10;


At the forum the code is ON. The matter is that I now move data from old forum's DB (not snitz) towards snitz's one not using ASP - directly at the Access DB. At the old forum the HTML was on and the HTML code in the DB is the same as if for output. Do you think if I replace the www. in the HTML code with their Decimal or Hex UNICODE's equivalents? OK, I try it may be replacing just the "." after the "www" with the "46" (Decimal) or "002E" (Hex) will be enough.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.41 seconds. Powered By: Snitz Forums 2000 Version 3.4.07