OperatingSystem
OSIndependent
Programming
Language
C
Cython
Python::2
Python::2.7
Python::3
Python::3.4
Python::3.5
Python::3.6
Python::3.7
Topic
Soware
Development::
Libraries::Python
Modules
TextProcessing::
Markup::HTML
TextProcessing::
Markup::XML
AC14N2.0implementationwasaddedas
etree.canonicalize() ,acorresponding
C14NWriterTarget class,anda c14n2 serialisationmethod.
Bugsfixed
WhenwritingtofilepathsthatcontaintheURLescape
character‘%’,thefilepathcouldwronglybemangledbyURL
unescapingandthuswritetoadierentfileordirectory.Code
thatwritestofilepathsthatareprovidedbyuntrustedsources,
butthatmustworkwithpreviousversionsoflxml,shouldbest
eitherrejectpathsthatcontain‘%’characters,orotherwise
makesurethatthepathdoesnotcontainmaliciouslyinjected
‘%XX’URLhexescapesforpathslike‘../’.
AssigningtoElementchildsliceswithnegativestepcould
insertthesliceatthewrongposition,startingtoofaronthe
le.
AssigningtoElementchildsliceswithoverlylargestepsize
couldtakeverylong,regardlessofthelengthoftheactualslice.
AssigningtoElementchildslicesofthewrongsizecould
sometimesfailtoraiseaValueError(likealistassignment
would)andinsteadassignoutsideoftheoriginalslicebounds
orleavepartsofitunreplaced.
The comment and pi eventsin iterwalk() werenever
triggered,andinstead,commentsandprocessinginstructions
inthetreewerereportedas start elements.Also,when
walkinganElementTree(asopposedtoitsrootelement),
commentsandPIsoutsideoftherootelementarenow
reported.
LP#1827833:TheRelaxNGcompactsyntaxsupportwasbroken
withrecentversionsof rnc2rng .
LP#1758553:TheHTMLelements source and track were
addedtothelistofemptytagsin lxml.html.defs .
Registeringaprefixotherthan“xml”fortheXMLnamespaceis
nowrejected.
FailingtowriteXSLToutputtoafilecouldraiseamisleading
exception.Itnowraises IOError .