Commit Graph

44742 Commits

Author SHA1 Message Date
Timm
1cdc511b90 Added LinkScrubber to remove duplication in LinkSanitizer. As such made PermitScrubber easier to subclass. 2014-06-16 21:04:03 +02:00
Timm
739ecdf753 Changed FullSanitizer sanitize to use tap method instead of temporary variable. 2014-06-16 21:04:03 +02:00
Timm
d1de087467 Extracted the common xpaths to remove into XPATHS_TO_REMOVE. 2014-06-16 21:04:03 +02:00
Timm
945e7f529e Refactored remove_xpaths to use duck typing and read better. 2014-06-16 21:04:02 +02:00
Timm
f428aeaa19 Changed explanation for no duck typing of custom scrubbers. 2014-06-16 21:04:02 +02:00
Timm
3ca10618a0 Added correct requires in html-scanner tests. Sanitizers are not based on html-scanner anymore, so sanitizer_test.rb is removed. 2014-06-16 21:04:02 +02:00
Timm
748f28157b Require ActionView::Assertions in ActionController test_case.rb. 2014-06-16 21:04:02 +02:00
Timm
7b2e753c1c Marked test_feed_xhtml as pending. See description in the test. 2014-06-16 21:04:01 +02:00
Timm
dea8ddbca1 Removed copyright notice since we aren't relying on html-scanner anymore. 2014-06-16 21:04:01 +02:00
Timm
09454dcca9 Removed require for active_support/core_ext/object/inclusion since in? isn't used anywhere. 2014-06-16 21:04:01 +02:00
Timm
95c517b6d6 Moved Dom and Selector assertions from ActionDispatch to ActionView. 2014-06-16 21:04:01 +02:00
Timm
9f73f9f38c Fixed: assert_select_encoded finds the right content. No longer uses a <encoded> wrapper. Updated tests to reflect this. 2014-06-16 21:04:00 +02:00
Timm
1bc0bece5b Removed mention of css_select supporting substitution values. It is not tested anywhere. 2014-06-16 21:04:00 +02:00
Timm
6fd74dc00e Updated documentation to state more things about css selectors with substitution values. 2014-06-16 21:04:00 +02:00
Timm
9020abe0e9 Reworked the wrapping root in NodeSet implementation in css_select. 2014-06-16 21:04:00 +02:00
Timm
77d0333c08 Wrapped element to search in NodeSet. Changed selectors to selector. 2014-06-16 21:03:59 +02:00
Timm
ea5f3ba0e2 Moved around alias line. 2014-06-16 21:03:59 +02:00
Timm
f2c9734be0 Returning from filter if matches are empty. 2014-06-16 21:03:59 +02:00
Timm
91650ddc3a Fixed: no longer wrapped @selected in fragment, since .css works fine without it. 2014-06-16 21:03:59 +02:00
Timm
f1031225f6 Reverted to using documents instead of document fragments, since searching via default xml namespaces didn't work. 2014-06-16 21:03:59 +02:00
Timm
a45ee9e5e3 add_regex returns inspected value for non Regexp objects. Workaround, so users don't have to care about enclosing values in double quotes. 2014-06-16 21:03:58 +02:00
Timm
3ac4c62622 Added test case for non-comment. Removed pending assertion that passed. 2014-06-16 21:03:58 +02:00
Timm
4f19614e55 Fixed: test_nested_assert_select selects from elements instead of elements[0] and elements[1]. 2014-06-16 21:03:58 +02:00
Timm
3c6ce74034 Fixed: inadvertently called message method in MiniTest instead of selector.message. 2014-06-16 21:03:58 +02:00
Timm
22aa73b3ee Cleaned up SubstitutionContext class. 2014-06-16 21:03:57 +02:00
Timm
99ac0cdcad Simplified assert_select further by moving match filtering into HTMLSelector select. 2014-06-16 21:03:57 +02:00
Timm
4ed784188d Fixed: now only compares html of children in filter_matches. 2014-06-16 21:03:57 +02:00
Timm
7e7e19132d Added NodeSet comparison to possible root element in determine_root_from. 2014-06-16 21:03:57 +02:00
Timm
2cc4f4258a Changed html_document to use fragments. Changed response_from_page to be an alias of html_document. 2014-06-16 21:03:56 +02:00
Timm
a5eeec4858 Changed xml_namespace test to correct syntax. However, Nokogiri won't recognize the namespace. 2014-06-16 21:03:56 +02:00
Timm
5670bbeeb3 Fixed bug by switching to Loofah fragment instead of document. 2014-06-16 21:03:56 +02:00
Timm
6f61cf6e78 Changed test methods to use new substitution syntax more in line with css selectors. 2014-06-16 21:03:56 +02:00
Timm
1b0a4b9351 Changed css_select to not count on multiple selectors. Fixed bug in determine_root_from where @selected was an Array. Changed assert_select_encoded to use a fragment instead of a document. 2014-06-16 21:03:56 +02:00
Timm
5f756e3ebe Added a proper substitution context class. Changed ArgumentFilter to be a selector. It is now called HTMLSelector. 2014-06-16 21:03:55 +02:00
Timm
8d6c92cecc Fixed nested assert_select bug. Trying to create a full document for a nested call that already had a document. 2014-06-16 21:03:55 +02:00
Timm
1e4f1ab95e Added implementation for substitution values via Nokogiri's custom pseudo classes. 2014-06-16 21:03:55 +02:00
Timm
9eada2daf8 Readded some documentation about substitution values. 2014-06-16 21:03:55 +02:00
Timm
e4772cc71e Fixed typo in method name. Fixed Nokogiri::CSS::SyntaxError. 2014-06-15 23:41:08 +02:00
Timm
1bc34386cf Updated testing guide to reflect changes in ActionDispatch::SelectorAssertions. 2014-06-15 23:41:08 +02:00
Timm
bc1363eb56 Updated documentation to remove mention of HTML::Selector and clarify what is expected of a selector now. 2014-06-15 23:41:07 +02:00
Timm
0a7fac5018 Changed tests to assert_kind_of Loofah::HTML::Document. 2014-06-15 23:41:07 +02:00
Timm
63fc9f1f4f Readded html_document method since it is used integration tests. 2014-06-15 23:41:07 +02:00
Timm
ab3a236b9d Removed selector_test.rb since HTML::Selector will be removed. Soon. 2014-06-15 23:41:07 +02:00
Timm
6aea3bc149 Changed filter_matches to return a new NodeSet instead of Array. 2014-06-15 23:41:07 +02:00
Timm
37ff080ca4 Fixed Nokogiri::CSS::SyntaxErrors.
Fixed a Nokogiri::CSS::SyntaxError by using its expected format for unicode characters.
2014-06-15 23:41:01 +02:00
Timm
37ac1c45a3 Replaced html-scanner with Loofah. 2014-06-15 23:41:00 +02:00
Timm
11fc26b96f Initialized @css_selector_is_second_argument in determine_root_from. 2014-06-15 23:41:00 +02:00
Timm
240ce95a83 Fixed Nokogiri::CSS::SyntaxErrors in test file. 2014-06-15 23:40:59 +02:00
Timm
9893a2896b Changed early return for filter_matches as well as reassigning matches. Meddled with initialize in ArgumentFilter. 2014-06-15 23:40:59 +02:00
Timm
7ef141a7fc Removed redundant comments from assert_select.
Cleaned up a comment.
2014-06-15 23:40:59 +02:00