Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML tags with different attributes order - correction for the Karol's fix #10

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Use 2 exactly same HTML files, where one of the elements has "style" 
attribute with values containing multiple rules
(e.g. style="text-decoration: underline; font-variant: italic").
2. Reverse the order of the css rules in the second file
(e.g. style="font-variant: italic; text-decoration: underline")

Same result can be achieved with "class" attribute. E.g.:
<h1 class="pagetitle  holidaystyle"> and
<h1 class="holidaystyle  pagetitle">

In fact, you don't even have to swap places - just add an extra space in 
the middle.

What is the expected output? 
no difference
What do you see instead?
"Moved out of ... moved in..."

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

Please provide any additional information below.
Attached are:
 2 files with a sample of the bug
 corrected file org.outerj.daisy.diff.html.dom.helperAttributesMap.java

I also added some comments (hope it's ok).

Of course, to be absolutely correct the style rule should resolve the 
styles and compare the rules too (to see that 2 style don't use the same 
name for different set of rules). However, I think that in most cases this 
won't happen.

This situation (with the mixed styles order and mixed class names order) 
often occurs when the HTML is generated by some program as a result of 
writing out some Document model after the changes were done in some 
WYSIWYG HTML editor (like using javax.swing.text.html package).

Original issue reported on code.google.com by anastass...@businesswire.com on 14 Apr 2009 at 5:17

Attachments:

@GoogleCodeExporter
Copy link
Author

oops - clicked the wrong button to attach the fix :)
sorry

Original comment by anastass...@businesswire.com on 14 Apr 2009 at 5:19

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks for the patch, looks very good. Again, shall I grant you commit access?
Also, would you like for a public mailing list to be constructed to discuss 
these
developments and review commit mails?

Original comment by guy...@gmail.com on 17 Apr 2009 at 10:22

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Thank you for the offer, I am gladly accepting it. 

Original comment by anastass...@businesswire.com on 17 Apr 2009 at 4:23

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by anastass...@businesswire.com on 25 Apr 2009 at 12:24

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant