Post by Ivan Shmakov$ html2text < 1348151128.xhtml
****** CSS ‘display:none’ example ******
This text should be visible, and this one shouldn't.
$
$ lynx -dump -- 1348151128.xhtml
CSS `display:none' example
This text should be visible, and this one shouldn't.
$
The document is as follows (it's correctly rendered by
Iceweasel, and passes checks at http://validator.w3.org/.)
$ cat < 1348151128.xhtml
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head>
<title>CSS ‘display:none’ example</title>
<style type="text/css">.invis { display: none; }</style>
</head>
<body>
<h1>CSS ‘display:none’ example</h1>
<p>This text should be
visible<span class="invis"
Post by Ben Bacarisse, and this one shouldn't</span>.</p>
</body>
</html>
$
Tricky! I tried with links (full screen text mode browser), elinks (full
screen text mode browser), w3m (full screen text mode browser), and
edbrowse (ed style, line by line text mode browser), too. All failed
that test:
$ links http://localhost/invis.html
CSS `display:none' example
This text should be visible, and this one shouldn't.
$ elinks http://localhost/invis.html
CSS `display:none' example
This text should be visible, and this one shouldn't.
$ w3m http://localhost/invis.html
CSS ‘display:none’ example
This text should be visible, and this one shouldn't.
$ edbrowse http://localhost/invis.html
no ssl certificate file specified; secure connections cannot be verified
417
85
1,$p
CSS ‘display:none’ example
This text should be visible, and this one shouldn't.
q
$
The last browser was selected because it, alone from all the
other text browsers, has some support for javascript text changes:
$ cat javascript.html
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head>
<title>Javascript ‘innerHTML’ example</title>
<script type="text/javascript">
function changeText(){
document.getElementById('change_me').innerHTML =
', and so should this';
}
</script>
</head>
<body onLoad="changeText();" >
<h1>Javascript ‘innerHTML’ example</h1>
<p>This text should be
visible<span id="change_me"
Post by Ivan Shmakov, and this one shouldn't</span>.</p>
</body>
</html>
$ edbrowse http://localhost/javascript.html
no ssl certificate file specified; secure connections cannot be verified
552
191
Javascript ‘innerHTML’ example
This text should be visible, and this one shouldn't.