What was broken RemoveClass left a repeated class behind
For class="a a", after RemoveClass("a") the element still had class a. A single strings.ReplaceAll pass missed the second occurrence, because adjacent classes share the space between them. ToggleClass had the same bug, so the next toggle switched the class off instead of on.
How we fixed it Removing until none are left
A removeClassFromClasses helper removes one occurrence at a time and rescans from the start until none are left. RemoveClass and ToggleClass both use it, and tests cover adjacent, tripled, leading, trailing and interleaved repeats.
#603
What was broken Selectors could not reach inside <noscript>
The HTML parser assumes scripting is on, and the spec then parses <noscript> content as raw text where no selector can find anything. The html package has a ParseOptionEnableScripting option, but goquery called html.Parse and there was no way to pass it.
How we fixed it A constructor with parser options
We added NewDocumentFromReaderWithOptions, which accepts parser options. The document keeps them and applies them to HTML added later too, for example through AppendHtml, AfterHtml or WrapHtml, while the existing API stays unchanged.
#602