MCPcopy Create free account
hub / github.com/clips/pattern / handle_charref

Method handle_charref

pattern/web/soup/BeautifulSoup.py:1395–1401  ·  view source on GitHub ↗

Handle character references as data.

(self, ref)

Source from the content-addressed store, hash-verified

1393 self._toStringSubclass(text, Comment)
1394
1395 def handle_charref(self, ref):
1396 "Handle character references as data."
1397 if self.convertEntities:
1398 data = unichr(int(ref))
1399 else:
1400 data = '&#%s;' % ref
1401 self.handle_data(data)
1402
1403 def handle_entityref(self, ref):
1404 """Handle entity references as data, possibly converting known

Callers

nothing calls this directly

Calls 1

handle_dataMethod · 0.95

Tested by

no test coverage detected