Skip to main content

HTML Processing

  • Chapter
  • First Online:
Python 2 and 3 Compatibility
  • 1630 Accesses

Abstract

Python has always been shipped with a cgi module to escape different characters, but this has limitations. Starting with Python 3.2, the HTML module curbs these shortcomings. HTML parsing and entities are achieved using different modules in Python 2 and 3, which makes a unified code base even harder to write. This chapter describes ways of implementing HTML escaping, parsing, and entities that work in both Python 2 and Python 3.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 27.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Joannah Nanjekye

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Nanjekye, J. (2017). HTML Processing. In: Python 2 and 3 Compatibility. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2955-2_7

Download citation

Publish with us

Policies and ethics