When I paste the content in FCK, break tags are added like this:
When I run the web page in html validator, getting error:
----------------------------------------
Line 68, Column 4: NET-enabling start-tag requires SHORTTAG YES.
<br />
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
----------------------------------------
How to change <br /> to <br> ?
please advice.
my text. <br /> <br /> some more text
When I run the web page in html validator, getting error:
----------------------------------------
Line 68, Column 4: NET-enabling start-tag requires SHORTTAG YES.
<br />
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.
----------------------------------------
How to change <br /> to <br> ?
please advice.
Re: <br /> are not validated in W3C validator? How to chan
I just want to change <br /> to <br> when FCK saving the text.
Re: <br /> are not validated in W3C validator? How to chan
Re: <br /> are not validated in W3C validator? How to chan
It's not actually HTML 4.01 strict, but rather SGML. According to SGML, this is valid HTML:
<br/
What the error above means is that the right angle bracket is not a part of the tag, but instead just a standalone character, which is an error within the <body> tag.
<body>
<br />
</body>
If you wrap <br/> in <div>, you will not see the error (not saying it's a fix - just explaining the error). FF will handle XHTML properly, if you identify your page as such, but IE cannot handle XHTML and will ignore anything XHTML-ish (CDATA, etc), but will suppress those orphaned right angle brackets, which leads many inexperienced developers believe that IE can handle XHTML.
To answer your question, you have two options. One is to use regular expressions and replace all empty tags, like <img .../>, <br/>, etc with their HTML equivalent. I believe the editor will do this automatically if the DOCTYPE on the internal editor document is HTML. See this:
http://docs.fckeditor.net/FCKeditor_2.x ... ns/DocType
Another way is to apply XSLT transformation on the server side to convert XHTML to HTML. You can see an example in this blog post:
http://blogs.stonesteps.ca/showpost.asp?pid=12
Re: <br /> are not validated in W3C validator? How to chan
Thank you alfonsoml and A.M for taking time and answering my question.
1. I am seeing 'FCKConfig.DocType' in 5 files. Add the DOCTYPE value in all 5 files?
2. Still I can keep the following tag in the html file as first line to validate?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Re: <br /> are not validated in W3C validator? How to chan
Re: <br /> are not validated in W3C validator? How to chan
OK.
I followed instructions here:
http://docs.fckeditor.net/FCKeditor_2.x ... ns/DocType
Changed one file:
/FCKeditor/fckconfig.js
I pasted some content in the editor, still it showing <br />
why?
Re: <br /> are not validated in W3C validator? How to chan
I upgraded all files to version 2.3.2 to recent 2.6.3 files.
Now pressing 'Enter' creating <p> tags. That is OK.
But pressing shift + Enter, still giving break tag as <br />
I added
FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
to config file. Still no use.
Anybody please?
Re: <br /> are not validated in W3C validator? How to chan
Re: <br /> are not validated in W3C validator? How to chan
That is what A.M told me to add. The following code to make <br /> to <br>

FCKConfig.DocType = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ;
No?
I just want to change <br /> to <br> in the content of fckeditor.
Re: <br /> are not validated in W3C validator? How to chan
Re: <br /> are not validated in W3C validator? How to chan
Oh... When he pointed me to the fllowing document I thought I have to paste it like showed in the document.
http://docs.fckeditor.net/FCKeditor_2.x ... ns/DocType
Now I updated DOCTYPE to -
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
in FCKcofig file.
Now I am getting <br> instead f <br />
Thanks everybody!