Skip to content

fix links enabling #20

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

Merged
merged 1 commit into from
May 20, 2014
Merged

fix links enabling #20

merged 1 commit into from
May 20, 2014

Conversation

kmike
Copy link
Collaborator

@kmike kmike commented May 19, 2014

In link enabling code toRemove and toPush objects were created inside a loop that iterates over attributes. They should be created in a level above, in a loop that iterates over elements. This caused two issues:

  1. only last attribute was enabled (that was not a problem because usually there is only one such attribute);
  2. toRemove and toPush objects were not cleaned for elements without attributes - this causes unrelated elements (e.g. a <span> tag inside <a href="..."> tag) to get href attributes from the previous elements.

kmike added a commit to scrapinghub/webstruct that referenced this pull request May 19, 2014
xtannier added a commit that referenced this pull request May 20, 2014
@xtannier xtannier merged commit 474b41d into xtannier:master May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants