therealglazou / bluegriffon

BlueGriffon, the Web editor
Mozilla Public License 2.0
300 stars 71 forks source link

critical: BlueGriffon 3.0.1 adds duplicate XHTML xmlns attributes #54

Closed garretwilson closed 6 years ago

garretwilson commented 6 years ago

I have a typical XHTML5 file that starts like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">

If I go into Source mode and do some cutting and pasting (e.g. cutting a <li> and moving it around in a list), BlueGriffon will duplicate the xmlns="http://www.w3.org/1999/xhtml", resulting in this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"

  lang="en-US">

(The extra line is because of #7 , which hasn't been fixed in almost two years, and on which I've put a USD$200 bounty that no one has taken advantage of.)

The extra xmlns attribute makes this a corrupted and non-well-formed XML file.

But it gets worse: now that BlueGriffon is in this mode of adding the extra xmlns attribute, it forces it to be added whatever I do. Even if I go to the Source tab and remove it, BlueGriffon will still save the duplicate attribute, writing a corrupted file that I cannot even load back into BlueGriffon.

garretwilson commented 6 years ago

Not only is this hugely irritating, it really is interrupting my workflow. I frequently drop into source mode to tweak edits. Now oftentimes when this happens, this bug will surface and I'll have to close the document, load a separate editor to fix the corrupted part, and then load the document back into BlueGriffon --- just to continue my work. You can imagine how this lowers my productivity.

garretwilson commented 6 years ago

Oh, no --- today this bug surfaced with simple editing of the source. I didn't even do any copy and paste!

I'll either have to downgrade, or keep a separate editor open if I want to edit the source.

therealglazou commented 6 years ago

Confirming.

therealglazou commented 6 years ago

Regression in Gecko's serializer.

therealglazou commented 6 years ago

Merged. Closing.

garretwilson commented 6 years ago

It's great that you fixed this so quickly. Thank you!

But do you intend to provide binary builds of the 3.1 release? I've been checking your web site frequently so I could get a fix for this problem, but I only see 3.0.1 available.

nosy-b commented 5 years ago

Yes it is quite a huuuge problem :) I would love to see the installer getting updated with r3.1 too