I am trying to read a HTML document in R containing some vue.js script. This document contains tags with attributes containing @ symbol.
When I read the document using read_html in R the attributes containing @ symbol are not parsed correctly.
read_html("<html><title @click='method'>Hi</title></html>")
{xml_document}
<html>
[1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n<title>Hi</title>\n</head>
The whole @click attribute is missing from the title tag. Can someone please let me know how to read tag attributes containing @ character?
Another example with inconsistent behaviour:
read_html("<html><title @click='$vuetify.goTo(0, goToOptions)' id='scrollBtn' style='display:none;' v-scroll='scrollfun'>Hi</title></html>")
{xml_document}
<html>
[1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n<title gotooptions id="scrollBtn" style="display:none;" v-scroll="scrollfun">Hi</title>\n</head>