Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bs4.element.ContentMetaAttributeValue Class Reference
Inheritance diagram for bs4.element.ContentMetaAttributeValue:
Inheritance graph
[legend]
Collaboration diagram for bs4.element.ContentMetaAttributeValue:
Collaboration graph
[legend]

Public Member Functions

Self __new__ (cls, str original_value)
 
str substitute_encoding (self, _Encoding eventual_encoding="utf-8")
 

Public Attributes

 original_value
 

Static Public Attributes

Pattern CHARSET_RE = re.compile(r"((^|;)\s*charset=)([^;]*)", re.M)
 
- Static Public Attributes inherited from bs4.element.AttributeValueWithCharsetSubstitution
str original_value
 

Detailed Description

A generic stand-in for the value of a ``<meta>`` tag's ``content``
attribute.

When Beautiful Soup parses the markup:
 ``<meta http-equiv="content-type" content="text/html; charset=utf8">``

The value of the ``content`` attribute will become one of these objects.

If the document is later encoded to an encoding other than UTF-8, its
``<meta>`` tag will mention the new encoding instead of ``utf8``.

Member Function Documentation

◆ substitute_encoding()

str bs4.element.ContentMetaAttributeValue.substitute_encoding (   self,
_Encoding   eventual_encoding = "utf-8" 
)
When an HTML document is being encoded to a given encoding, the
value of the ``charset=`` in a ``<meta>`` tag's ``content`` becomes
the name of the encoding.

Reimplemented from bs4.element.AttributeValueWithCharsetSubstitution.


The documentation for this class was generated from the following file: