| Author |
Topic Search Topic Options
|
tillmeister
Newbie
Joined: 27 March 2008
Location: UK
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Topic: Valid Line Breaks Posted: 27 March 2008 at 4:53pm |
|
Hi
I was wondering if anyone can help me.
Is there anyway you can change it so that when it places a <br> on the page, it can place <br /> instead?
Which file would I need to edit for this?
I want all the pages on my website to validate that's all.
I had a quick search for the topic and it doesn't seem to have been covered, however it has already I aplogise.
I would really appreciate any advice anyone can offer.
Thanks
Mark
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 March 2008 at 4:59pm |
|
This depends on which browser you use.
Because the RTE uses the built in RTE API of the web browser, it is the actual web browser that creates the HTML code.
The code produced by Firefox is quite clean, however, the code produced by IE is shocking to say the least and doesn't validate very well.
|
|
|
 |
tillmeister
Newbie
Joined: 27 March 2008
Location: UK
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 March 2008 at 5:33pm |
|
I'm using the latest version of firefox.
I haven't tried it in opera or safari.
I only usualy use IE for testing purposes to, I know what a pain it can be.
I will try it in opera and safari and see what happens but if anyone does have a solution, please let me know.
Thanks
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 March 2008 at 6:02pm |
|
If you are submitting the form to an ASP page for processing then you can always use the following syntax:-
Replace(strFormInput, "<br>", "<br />")
|
|
|
 |
tillmeister
Newbie
Joined: 27 March 2008
Location: UK
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 27 March 2008 at 6:12pm |
|
I'll try that when I'm back at work tomorrow and let you know if it works.
Thanks!
|
 |
tillmeister
Newbie
Joined: 27 March 2008
Location: UK
Status: Offline
Points: 5
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2008 at 10:24am |
|
Hi again.
I've tried using Replace(strFormInput, "<br>", "<br />"), but I'm a bit unsure of where to enter this code. This is basically how my site works:
I have backend system where data can be updated, so there's an editpage.asp, which when new information is updated, updates the product.asp?id=product_1.
Would the code need to go on one of these pages? I was getting this error message. ---- Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/cms/_editpage.asp, line 209
Replace(strFormInput, "<br>", "<br />") ----
My complete backend system and website work, I just wanted it so that my colleagues can enter new information without having to worry about putting <br /><br /> at the end of every line, but I also still want the site to validate.
I also tried using Opera and Safari but they did not make a difference.
Sorry for being such a pain.
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 28 March 2008 at 11:16am |
|
The part 'strFormInput' needs to be changed to your own variable that you read the form input into then after it is read in your need:-
strFormInput = Replace(strFormInput, "<br>", "<br />")
Replacing the 2 parts in read with the variable name that you are using.
|
|
|
 |