escape html tag

master
Kanezoh 2021-11-18 13:49:42 +09:00
parent 0ceaffc7b0
commit 7f8d508c00
14 changed files with 14 additions and 13 deletions

View File

@ -68,7 +68,7 @@ class Mechanize::Form
elements_with "checkbox", "checkboxes"
elements_with "button"
# Returns all fields of <input type="textarea">
# Returns all fields of &lt;input type="textarea"&gt;
def textareas
fields.select { |f| f.class == FormContent::Textarea }.map &.as(FormContent::Textarea)
end

View File

@ -1,5 +1,5 @@
# This class represents button related html element.
# <button>, and <input> whose type is button, reset, image, submit.
# &lt;button&gt;, and &lt;input&gt; whose type is button, reset, image, submit.
class Mechanize::FormContent::Button < Mechanize::FormContent::Field
getter form_node : Node | Lexbor::Node

View File

@ -1,4 +1,4 @@
# This class represents <input type="checkbox">
# This class represents &lt;input type="checkbox"&gt;
class Mechanize::FormContent::CheckBox < Mechanize::FormContent::RadioButton
# set checkbox checked
def check

View File

@ -1,4 +1,4 @@
# This class represents <input> elements in the form.
# This class represents &lt;input&gt; elements in the form.
class Mechanize::FormContent::Field
# returns field's 'value' attribute
property value : String?

View File

@ -1,3 +1,3 @@
# This class represents <input type="hidden">
# This class represents &lt;input type="hidden"&gt;
class Mechanize::FormContent::Hidden < Mechanize::FormContent::Field
end

View File

@ -1,3 +1,3 @@
# This class represents <input type="image">
# This class represents &lt;input type="image"&gt;
class Mechanize::FormContent::ImageButton < Mechanize::FormContent::Button
end

View File

@ -1,6 +1,6 @@
require "./option"
# This class represents <select multiple>
# This class represents &lt;select multiple&gt;
class Mechanize::FormContent::MultiSelectList
getter node : Lexbor::Node
getter name : String

View File

@ -1,3 +1,4 @@
# This class represents &lt;option&gt; of &lt;select&gt;
class Mechanize::FormContent::Option
getter select_list : FormContent::MultiSelectList
getter node : Lexbor::Node

View File

@ -1,4 +1,4 @@
# This class represents <input type="radio">
# This class represents &lt;input type="radio"&gt;
class Mechanize::FormContent::RadioButton < Mechanize::FormContent::Field
property :checked, :form

View File

@ -1,3 +1,3 @@
# This class represents <input type="reset">
# This class represents &lt;input type="reset"&gt;
class Mechanize::FormContent::ResetButton < Mechanize::FormContent::Button
end

View File

@ -1,6 +1,6 @@
require "./multi_select_list"
# This class represents <select> which is not multiple
# This class represents &lt;select&gt; which is not multiple
class Mechanize::FormContent::SelectList < Mechanize::FormContent::MultiSelectList
def initialize(node)
super node

View File

@ -1,3 +1,3 @@
# This class represents <input type="submit">
# This class represents &lt;input type="submit"&gt;
class Mechanize::FormContent::SubmitButton < Mechanize::FormContent::Button
end

View File

@ -1,3 +1,3 @@
# This class represents <input type="text">
# This class represents &lt;input type="text"&gt;
class Mechanize::FormContent::Text < Mechanize::FormContent::Field
end

View File

@ -1,3 +1,3 @@
# This class represents <input type="textarea">
# This class represents &lt;input type="textarea"&gt;
class Mechanize::FormContent::Textarea < Mechanize::FormContent::Field
end