karthick2014 / jwysiwyg

Automatically exported from code.google.com/p/jwysiwyg
0 stars 0 forks source link

Line breaks being posted <br> or <BR> #53

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Posting the form

What is the expected output? What do you see instead?
XHTML breaks should be <br />

What version of the product are you using? On what operating system?
1.0 on Windows

Please provide any additional information below.

Can be fixed by changing the following code:

        getContent : function()
        {
            var markup = $( $(this.editor).document() ).find('body').html();
            return markup.replace(/<br>/g, '<br />').replace(/<BR>/g, '<br
/>');
        },

Original issue reported on code.google.com by zia...@gmail.com on 30 Oct 2008 at 4:09

GoogleCodeExporter commented 8 years ago
The reason I've used two replaces is because IE7 seems to throw some errors when
using a global case insensitive replace.

Original comment by zia...@gmail.com on 30 Oct 2008 at 4:11

GoogleCodeExporter commented 8 years ago
Hi. I think the feature for valid XTML must be work of a plugin for this 
plugin. It's
better to do the control extensible and who need XHTML output use the addon.

If it's for the <br>, it's also for <input> and everything else. What you think 
?

Original comment by joksnet on 12 Nov 2008 at 6:40

GoogleCodeExporter commented 8 years ago
please we want xhtml version of this plugin =) with 's and <i> tags and all.

Original comment by mustafag...@gmail.com on 4 Dec 2008 at 1:39

GoogleCodeExporter commented 8 years ago
Yes, please xhtml! :)

Original comment by bakerm...@gmail.com on 19 Dec 2008 at 12:21

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I agree.
XHTML is the current working standard for web pages.
It's kind of useless for most people if the plugin creates HTML4 <br> tags.

Original comment by matthewr...@gmail.com on 19 Jan 2009 at 7:27

GoogleCodeExporter commented 8 years ago
Yes all markup should be with standard tags (strong,em,etc.) as opposed to span 
tags
with inline css. 

Original comment by see...@gmail.com on 20 Feb 2009 at 4:14

GoogleCodeExporter commented 8 years ago
It seems that the br-s are replaced by div-s in the code now. So that looks 
nice. But 
still b-, i- and u-tags seems to be in use. Any suggestion on how you would 
make a 
work-around for this?

Thanks! :)

Original comment by erlen...@online.no on 19 Dec 2009 at 9:13

GoogleCodeExporter commented 8 years ago
 getContent : function()
        {
            /*return $( $(this.editor).document() ).find('body').html();*/
            var markup = $( $(this.editor).document() ).find('body').html();
            return markup.replace(/<br>/g, '<br />').replace(/<BR>/g, '<br
/>').replace(/<br \/><br \/>/g, '</p><p>');

        }

Original comment by mag...@gmail.com on 16 Feb 2010 at 3:03