1
0
mirror of https://github.com/golang/go synced 2024-10-04 00:11:21 -06:00
Commit Graph

172 Commits

Author SHA1 Message Date
Andrew Balholm
ce4eec2e0a html: treat <image> as <img>
Pass tests1.dat, test 90:
<p><image></p>

| <html>
|   <head>
|   <body>
|     <p>
|       <img>

Also pass test 91:
<a><table><a></table><p><a><div><a>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5339052
2011-11-09 09:43:55 +11:00
Andrew Balholm
f2b602ed42 html: parse <body>, <base>, <link>, <meta>, and <title> tags inside page body
Pass tests1.dat, test 87:
<body><body><base><link><meta><title><p></title><body><p></body>

| <html>
|   <head>
|   <body>
|     <base>
|     <link>
|     <meta>
|     <title>
|       "<p>"
|     <p>

Handling the last <body> tag requires correcting the original insertion mode in useTheRulesFor.

Also pass test 88:
<textarea><p></textarea>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5364047
2011-11-08 17:55:17 +11:00
Nigel Tao
46ee09eff1 html: fix typo in package docs.
Fixes #2419.

R=dsymonds, rsc
CC=golang-dev
https://golang.org/cl/5352046
2011-11-08 10:09:17 +11:00
Nigel Tao
bbd173fc3d html: be able to test more than one testdata file.
R=andybalholm
CC=golang-dev
https://golang.org/cl/5351041
2011-11-07 09:38:40 +11:00
Mike Samuel
a5291099d2 html/template: wraps package template instead of exposing func Escape
This does escaping on first execution.

template.go defines the same interface elements as package template.
It requires rather more duplication of code than I'd like, but I'm
not clear how to avoid that.

Maybe instead of

    mySet.ParseGlob(...)
    template.ParseSetGlob(...)
    mySet.ParseFiles(...)
    mySet.ParseTemplateFiles(...)
    template.ParseTemplateFiles(...)

we combine these into a fileset abstraction that can be wrapped

    var fileset template.FileSet
    fileset.Glob(...)  // Load a few files by glob
    fileset.Files(...)  // Load a few {{define}}d files
    fileset.TemplateFiles(...)  // Load a few files as template bodies
    fileset.Funcs(...)  // Make the givens func available to templates
    // Do the parsing.
    set, err := fileset.ParseSet()
    // or set, err := fileset.ParseInto(set)

or provide an interface that can receive filenames and functions and
parse messages:

    type Bundle interface {
      TemplateFile(string)
      File(string)
      Funcs(FuncMap)
    }

and define template.Parse* to handle the file-system stuff and send
messages to a bundle:

    func ParseFiles(b Bundle, filenames ...string)

R=r, r
CC=golang-dev
https://golang.org/cl/5270042
2011-11-04 13:09:21 -04:00
Gustavo Niemeyer
f2dc50b48d html,bzip2,sql: rename Error methods that return error to Err
There are three classes of methods/functions called Error:

a) The Error method in the just introduced error interface
b) Error methods that create or report errors (http.Error, etc)
c) Error methods that return errors previously associated with
   the receiver (Tokenizer.Error, rows.Error, etc).

This CL introduces the convention that methods in case (c)
should be named Err.

The reasoning for the change is:

- The change differentiates the two kinds of APIs based on
  names rather than just on signature, unloading Error a bit
- Err is closer to the err variable name that is so commonly
  used with the intent of verifying an error
- Err is shorter and thus more convenient to be used often
  on error verifications, such as in iterators following the
  convention of the sql package.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5327064
2011-11-04 09:50:20 -04:00
Andrew Balholm
632a2c59b1 html: properly close <tr> element when an new <tr> starts.
Pass tests1.dat, test 87:
<table><tr><tr><td><td><span><th><span>X</table>

| <html>
|   <head>
|   <body>
|     <table>
|       <tbody>
|         <tr>
|         <tr>
|           <td>
|           <td>
|             <span>
|           <th>
|             <span>
|               "X"

R=nigeltao
CC=golang-dev
https://golang.org/cl/5343041
2011-11-04 15:48:11 +11:00
Andrew Balholm
46308d7d11 html: move <link> element from after <head> into <head>
Pass tests1.dat, test 85:
<head><meta></head><link>

| <html>
|   <head>
|     <meta>
|     <link>
|   <body>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5297079
2011-11-04 09:29:06 +11:00
Vincent Vanackere
eb1717e035 all: rename os.EOF to io.EOF in various non-code contexts
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5334050
2011-11-03 14:01:30 -07:00
Rob Pike
5cb4a15320 html,log,math: renamings
This is Go 1 package renaming CL #2.
This one merely moves the source; the import strings will be
changed after the next weekly release.

exp/template/html -> html/template
big -> math/big
cmath -> math/cmplx
rand -> math/rand
syslog -> log/syslog

The only edits are in Makefiles and deps.bash.

Note that this CL moves exp/template/html out of exp. I decided
to do that so all the renamings can be done together, even though
the API (and that of template, for that matter) is still fluid.

R=r, rsc
CC=golang-dev
https://golang.org/cl/5332053
2011-11-03 12:42:57 -07:00
Andrew Balholm
77aabbf217 html: parse <link> elements in <head>
Pass tests1.dat, test 83:
<title><meta></title><link><title><meta></title>

| <html>
|   <head>
|     <title>
|       "<meta>"
|     <link>
|     <title>
|       "<meta>"
|   <body>

Also pass test 84:
<style><!--</style><meta><script>--><link></script>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5331061
2011-11-03 17:12:13 +11:00
Andrew Balholm
cf6a712162 html: properly close <marquee> elements.
Pass tests1.dat, test 80:
<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa

| <html>
|   <head>
|   <body>
|     <a>
|       href="a"
|       "aa"
|       <marquee>
|         "aa"
|         <a>
|           href="b"
|           "bb"
|       "aa"

Also pass tests through test 82:
<!DOCTYPE html><spacer>foo

R=nigeltao
CC=golang-dev
https://golang.org/cl/5319071
2011-11-03 10:11:06 +11:00
Russ Cox
c2049d2dfe src/pkg/[a-m]*: gofix -r error -force=error
R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/5322051
2011-11-01 22:04:37 -04:00
Andrew Balholm
22ee5ae25a html: stop at scope marker node when generating implied </a> tags
A <a> tag generates implied end tags for any open <a> elements.
But it shouldn't do that when it is inside a table cell the the open <a>
is outside the table.
So stop the search for an open <a> when we reach a scope marker node.

Pass tests1.dat, test 78:
<a href="blah">aba<table><tr><td><a href="foo">br</td></tr>x</table>aoe

| <html>
|   <head>
|   <body>
|     <a>
|       href="blah"
|       "abax"
|       <table>
|         <tbody>
|           <tr>
|             <td>
|               <a>
|                 href="foo"
|                 "br"
|       "aoe"

Also pass test 79:
<table><a href="blah">aba<tr><td><a href="foo">br</td></tr>x</table>aoe

R=nigeltao
CC=golang-dev
https://golang.org/cl/5320063
2011-11-02 11:47:05 +11:00
Nigel Tao
90b76c0f3e html: refactor the blacklist for the "render and re-parse" test.
R=andybalholm
CC=golang-dev, mikesamuel
https://golang.org/cl/5331056
2011-11-02 09:42:25 +11:00
Andrew Balholm
9db3f78c39 html: process </td> tags; foster parent at most one node per token
Correctly close table cell when </td> is read.

Because of reconstructing the active formatting elements, more than one
node may be created when reading a single token.
If both nodes are foster parented, they will be siblings, but the first
node should be the parent of the second.

Pass tests1.dat, test 77:
<a href="blah">aba<table><a href="foo">br<tr><td></td></tr>x</table>aoe

| <html>
|   <head>
|   <body>
|     <a>
|       href="blah"
|       "aba"
|       <a>
|         href="foo"
|         "br"
|       <a>
|         href="foo"
|         "x"
|       <table>
|         <tbody>
|           <tr>
|             <td>
|     <a>
|       href="foo"
|       "aoe"

R=nigeltao
CC=golang-dev
https://golang.org/cl/5305074
2011-11-01 11:42:54 +11:00
Andrew Balholm
604e10c34d html: adjust bookmark in "adoption agency" algorithm
In the adoption agency algorithm, the formatting element is sometimes
removed from the list of active formatting elements and reinserted at a later index.
In that case, the bookmark showing where it is to be reinserted needs to be moved,
so that its position relative to its neighbors remains the same
(and also so that it doesn't become out of bounds).

Pass tests1.dat, test 70:
<DIV> abc <B> def <I> ghi <P> jkl </B>

| <html>
|   <head>
|   <body>
|     <div>
|       " abc "
|       <b>
|         " def "
|         <i>
|           " ghi "
|       <i>
|         <p>
|           <b>
|             " jkl "

Also pass tests through test 76:
<test attribute---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5322052
2011-10-29 10:51:59 +11:00
Andrew Balholm
03f163c7f2 html: don't run "adoption agency" on elements that aren't in scope.
Pass tests1.dat, test 55:
<!DOCTYPE html><font><table></font></table></font>

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <font>
|       <table>

Also pass tests through test 69:
<DIV> abc <B> def <I> ghi <P> jkl

R=nigeltao
CC=golang-dev
https://golang.org/cl/5309074
2011-10-28 16:04:58 +11:00
Russ Cox
785baa86f1 html: fix print argument in test
R=nigeltao
CC=golang-dev
https://golang.org/cl/5302069
2011-10-27 18:04:29 -07:00
Andrew Balholm
053549ca1b html: allow whitespace text nodes in <head>
Pass tests1.dat, test 50:
<!DOCTYPE html><script> <!-- </script> --> </script> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <script>
|       " <!-- "
|     " "
|   <body>
|     "-->  EOF"

Also pass tests through test 54:
<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5311066
2011-10-28 09:06:30 +11:00
Andrew Balholm
833fb4198d html: parse <style> elements inside <head> element.
Also correctly handle EOF inside a <style> element.

Pass tests1.dat, test 49:
<!DOCTYPE html><style> EOF

| <!DOCTYPE html>
| <html>
|   <head>
|     <style>
|       " EOF"
|   <body>

R=nigeltao
CC=golang-dev
https://golang.org/cl/5321057
2011-10-27 10:26:11 +11:00
Andrew Balholm
bd07e4f259 html: close <option> element when opening <optgroup>
Pass tests1.dat, test 34:
<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     "A"
|     <option>
|       "B"
|     <optgroup>
|       "C"
|       <select>
|         "DE"

Also passes tests 35-48. Test 48 is:
</ COM--MENT >

R=nigeltao
CC=golang-dev
https://golang.org/cl/5311063
2011-10-27 09:45:53 +11:00
Russ Cox
db33959797 cgo, goyacc, go/build, html, http, path, path/filepath, testing/quick, test: use rune
Nothing terribly interesting here.

R=golang-dev, bradfitz, gri, r
CC=golang-dev
https://golang.org/cl/5300043
2011-10-25 22:20:02 -07:00
Andrew Balholm
05ed18f4f6 html: improve parsing of lists
Make a <li> tag close the previous <li> element.
Make a </ul> tag close <li> elements.

Pass tests1.dat, test 33:
<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do-->

| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <li>
|       "hello"
|     <li>
|       "world"
|       <ul>
|         "how"
|         <li>
|           "do"
|       "you"
|   <!-- do -->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5321051
2011-10-26 14:02:30 +11:00
Andrew Balholm
6e318bda6c html: improve parsing of tables
When foster parenting, merge adjacent text nodes.
Properly close table row at </tr> tag.

Pass tests1.dat, test 32:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

R=nigeltao
CC=golang-dev
https://golang.org/cl/5323048
2011-10-26 11:36:46 +11:00
Nigel Tao
18b025d530 html: remove the Tokenizer.ReturnComments option.
The original intention was to simplify the parser, in making it skip
all comment tokens. However, checking that the Go html package is
100% compatible with the WebKit HTML test suite requires parsing the
comments. There is no longer any real benefit for the option.

R=gri, andybalholm
CC=golang-dev
https://golang.org/cl/5321043
2011-10-25 11:28:07 +11:00
Andrew Balholm
2f3f3aa2ed html: dump attributes when running parser tests.
The WebKit test data shows attributes as though they were child nodes:

<a X>0<b>1<a Y>2
dumps as:
| <html>
|   <head>
|   <body>
|     <a>
|       x=""
|       "0"
|       <b>
|         "1"
|     <b>
|       <a>
|         y=""
|         "2"

So we need to do the same when dumping a tree to compare with it.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5322044
2011-10-25 09:33:15 +11:00
Andrew Balholm
2aa589c843 html: implement foster parenting
Implement the foster-parenting algorithm for content that is inside a table
but not in a cell.

Also fix a bug in reconstructing the active formatting elements.

Pass test 30 in tests1.dat:
<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y

R=nigeltao
CC=golang-dev
https://golang.org/cl/5309052
2011-10-23 18:36:01 +11:00
Nigel Tao
2f352ae48a html: parse <select> tags.
The additional test case in parse_test.go is:
<select><b><option><select><option></b></select>X

R=andybalholm
CC=golang-dev
https://golang.org/cl/5293051
2011-10-22 20:18:12 +11:00
Nigel Tao
64306c9fd0 html: parse and render comment nodes.
The first additional test case in parse_test.go is:
<!--><div>--<!-->

The second one is unrelated to the comment change, but also passes:
<p><hr></p>

R=andybalholm
CC=golang-dev
https://golang.org/cl/5299047
2011-10-20 11:45:30 +11:00
Nigel Tao
b1fd528db5 html: parse raw text and RCDATA elements, such as <script> and <title>.
Pass tests1.dat, test 26:
#data
<script><div></script></div><title><p></title><p><p>
#document
| <html>
|   <head>
|     <script>
|       "<div>"
|     <title>
|       "<p>"
|   <body>
|     <p>
|     <p>

Thanks to Andy Balholm for driving this change.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5301042
2011-10-19 08:03:30 +11:00
Nigel Tao
e5f3dc8bc5 html: refactor the tokenizer; parse "</>" correctly.
Previously, Next would call either nextText or nextTag, but nextTag
could also call nextText. Both nextText and nextTag were responsible
for detecting "</a" end tags and "<!" comments. This change simplifies
the call chain and puts that responsibility in a single place.

R=andybalholm
CC=golang-dev
https://golang.org/cl/5263050
2011-10-18 09:42:16 +11:00
Nigel Tao
1887907fee html: tokenize "a < b" as one whole text token.
R=andybalholm
CC=golang-dev
https://golang.org/cl/5284042
2011-10-16 20:50:11 +11:00
Andrew Balholm
b770c9e9a2 html: improve parsing of comments and "bogus comments"
R=nigeltao
CC=golang-dev
https://golang.org/cl/5279044
2011-10-15 12:22:08 +11:00
Nigel Tao
b82a8e7c22 html: fix some tokenizer bugs with attribute key/values.
The relevant spec sections are 13.2.4.38-13.2.4.40.
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#attribute-value-(double-quoted)-state

R=andybalholm
CC=golang-dev
https://golang.org/cl/5262044
2011-10-14 15:22:02 +11:00
Nigel Tao
a49b8b9875 html: rewrite the tokenizer to be more consistent.
Previously, the tokenizer made two passes per token. The first pass
established the token boundary. The second pass picked out the tag name
and attributes inside that boundary. This was problematic when the two
passes disagreed. For example, "<p id=can't><p id=won't>" caused an
infinite loop because the first pass skipped everything inside the
single quotes, and recognized only one token, but the second pass never
got past the first '>'.

This change rewrites the tokenizer to use one pass, accumulating the
boundary points of token text, tag names, attribute keys and attribute
values as it looks for the token endpoint.

It should still be reasonably efficient: text, names, keys and values
are not lower-cased or unescaped (and converted from []byte to string)
until asked for.

One of the token_test test cases was fixed to be consistent with
html5lib. Three more test cases were temporarily disabled, and will be
re-enabled in a follow-up CL. All the parse_test test cases pass.

R=andybalholm, gri
CC=golang-dev
https://golang.org/cl/5244061
2011-10-14 09:58:39 +11:00
Andrew Balholm
c64e8e327e html: insert implied <p> and </p> tags
(test # 25 in tests1.dat)
#data
<p><b><div></p></b></div>X
#document
| <html>
|   <head>
|   <body>
|     <p>
|       <b>
|     <div>
|       <b>
|
|           <p>
|           "X"

R=nigeltao
CC=golang-dev
https://golang.org/cl/5254060
2011-10-13 12:40:48 +11:00
Nigel Tao
85368292a3 html: when a parse test fails, don't bother testing rendering.
R=andybalholm
CC=golang-dev
https://golang.org/cl/5248061
2011-10-13 11:53:15 +11:00
Nigel Tao
be8b4d943f html: add a Render function.
R=mikesamuel, andybalholm
CC=golang-dev
https://golang.org/cl/5218041
2011-10-10 14:44:37 +11:00
Nigel Tao
bca65e395e html: parse more malformed tags.
This continues the work in revision 914a659b44ff, now passing more test
cases. As before, the new tokenization tests match html5lib's behavior.

Fixes #2124.

R=dsymonds, r
CC=golang-dev
https://golang.org/cl/4867042
2011-08-11 18:49:09 +10:00
Nigel Tao
37afff2978 html: parse malformed tags missing a '>', such as <p id=0</p>.
The additional token_test.go cases matches html5lib behavior.

Fixes #2124.

R=gri
CC=golang-dev
https://golang.org/cl/4844055
2011-08-10 13:39:07 +10:00
Nigel Tao
1d0c141d7d html: parse doctype tokens; merge adjacent text nodes.
The test case input is "<!DOCTYPE html><span><button>foo</span>bar".
The correct parse is:
| <!DOCTYPE html>
| <html>
|   <head>
|   <body>
|     <span>
|       <button>
|         "foobar"

R=gri
CC=golang-dev
https://golang.org/cl/4794063
2011-08-01 10:26:46 +10:00
Nigel Tao
5f134f9b5b html: sync html/testdata/webkit with upstream WebKit.
As $GOROOT/src/pkg/html/testdata/webkit/README says, we're pulling from
$WEBKITROOT/LayoutTests/html5lib/resources.

R=r
CC=golang-dev
https://golang.org/cl/4810043
2011-07-21 12:50:45 +10:00
Nigel Tao
5a141064ed html: parse misnested formatting tags according to the HTML5 spec.
This is the "adoption agency" algorithm.

The test case input is "<a><p>X<a>Y</a>Z</p></a>". The correct parse is:
| <html>
|   <head>
|   <body>
|     <a>
|     <p>
|       <a>
|         "X"
|       <a>
|         "Y"
|       "Z"

R=gri
CC=golang-dev
https://golang.org/cl/4771042
2011-07-21 11:20:54 +10:00
Andrew Balholm
816c972ff0 html: handle character entities without semicolons
Fix the TODO: unescape("&notit;") should be "¬it;"

Also accept digits in entity names.

R=nigeltao
CC=golang-dev, rsc
https://golang.org/cl/4781042
2011-07-21 09:10:49 +10:00
Nigel Tao
d360e0213d html: update section references in comments to the latest HTML5 spec.
R=r
CC=golang-dev
https://golang.org/cl/4699048
2011-07-13 16:53:02 +10:00
Yasuhiro Matsumoto
1e6d946594 html: parse start tags that aren't explicitly otherwise dealt with.
R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/4626080
2011-07-06 13:08:52 +10:00
Yasuhiro Matsumoto
054cf72b56 html: fix nesting when parsing a close tag.
R=nigeltao
CC=golang-dev
https://golang.org/cl/4636067
2011-06-30 23:16:33 +10:00
Rob Pike
ebb1566a46 strings.Split: make the default to split all.
Change the signature of Split to have no count,
assuming a full split, and rename the existing
Split with a count to SplitN.
Do the same to package bytes.
Add a gofix module.

R=adg, dsymonds, alex.brainman, rsc
CC=golang-dev
https://golang.org/cl/4661051
2011-06-28 09:43:14 +10:00
Brad Fitzpatrick
5e03143c1a html: improve attribute parsing, note package status
Fixes #1890

R=nigeltao
CC=golang-dev
https://golang.org/cl/4528102
2011-06-06 15:56:15 -07:00
Robert Hencke
c8727c81bb pkg: spelling tweaks, A-H
R=ality, bradfitz, rsc, dsymonds, adg, qyzhai, dchest
CC=golang-dev
https://golang.org/cl/4536063
2011-05-18 13:14:56 -04:00
Brad Fitzpatrick
f4e5f364c7 html: parse empty, unquoted, and single-quoted attribute values
Fixes #1391

R=nigeltao
CC=golang-dev
https://golang.org/cl/4453054
2011-05-12 16:11:35 -07:00
Brad Fitzpatrick
9d12307a12 ioutil: add Discard, update tree.
This also removes an unnecessary allocation in
http/transfer.go

R=r, rsc1, r2, adg
CC=golang-dev
https://golang.org/cl/4426066
2011-04-27 15:47:04 -07:00
Nigel Tao
6a186d38d1 src/pkg: make package doc comments consistently start with "Package foo".
R=rsc
CC=golang-dev
https://golang.org/cl/4442064
2011-04-20 09:57:05 +10:00
Rob Pike
8a90fd3c72 os: New Open API.
We replace the current Open with:
OpenFile(name, flag, perm) // same as old Open
Open(name) // same as old Open(name, O_RDONLY, 0)
Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666)

This CL includes a gofix module and full code updates: all.bash passes.
(There may be a few comments I missed.)

The interesting packages are:
        gofix
        os
Everything else is automatically generated except for hand tweaks to:
        src/pkg/io/ioutil/ioutil.go
        src/pkg/io/ioutil/tempfile.go
        src/pkg/crypto/tls/generate_cert.go
        src/cmd/goyacc/goyacc.go
        src/cmd/goyacc/units.y

R=golang-dev, bradfitzwork, rsc, r2
CC=golang-dev
https://golang.org/cl/4357052
2011-04-04 23:42:14 -07:00
Nigel Tao
42ed1ad4a6 html: small documentation fix.
R=rsc
CC=golang-dev
https://golang.org/cl/4169058
2011-02-18 10:35:49 +11:00
Nigel Tao
a5ff8ad9db html: tokenize HTML comments.
I'm not sure if it's 100% correct wrt the HTML5 specification,
but the test suite has plenty of HTML comment test cases, and
we'll shake out any tokenization bugs as the parser improves its
coverage.

R=gri
CC=golang-dev
https://golang.org/cl/4186055
2011-02-17 10:45:30 +11:00
Nigel Tao
fec6ab9726 html: parse "<h1>foo<h2>bar".
R=gri
CC=golang-dev
https://golang.org/cl/3571043
2010-12-15 11:39:56 +11:00
Nigel Tao
71bd053ada html: parse <table><tr><td> tags.
Also, shorten fooInsertionMode to fooIM.

R=gri
CC=golang-dev
https://golang.org/cl/3504042
2010-12-10 12:20:14 +11:00
Nigel Tao
49014c5b12 html: handle unexpected EOF during parsing.
This lets us parse HTML like "<html>foo".

R=gri
CC=golang-dev
https://golang.org/cl/3460043
2010-12-08 08:59:20 +11:00
Nigel Tao
688a83128d html: move the sanity checking of the entity map from runtime
(during init) to test-time (via gotest).

R=gri
CC=golang-dev
https://golang.org/cl/3466044
2010-12-08 07:55:03 +11:00
Ryan Hitchman
f503e26379 html: unescape numeric entities, and complete the named entities table, including two-character entities.
Fixes #1233.

R=nigeltao
CC=golang-dev
https://golang.org/cl/3445041
2010-12-07 12:13:47 +11:00
Nigel Tao
08a47d6f60 html: first cut at a parser.
R=gri
CC=golang-dev
https://golang.org/cl/3355041
2010-12-07 12:02:36 +11:00
Adam Langley
3cb4bdb9ce utf8: make EncodeRune's destination the first argument.
R=r
CC=golang-dev
https://golang.org/cl/3364041
2010-11-30 16:59:43 -05:00
Russ Cox
69c4e9380b use append
R=gri, r, r2
CC=golang-dev
https://golang.org/cl/2743042
2010-10-27 19:47:23 -07:00
Robert Griesemer
3478891d12 gofmt -s -w src misc
R=r, rsc
CC=golang-dev
https://golang.org/cl/2662041
2010-10-22 10:06:33 -07:00
Russ Cox
7c9f0f0109 html: disable print
Everything is incomplete.
Let's not make noise like this a habit.

R=nigeltao_gnome
CC=golang-dev
https://golang.org/cl/2272041
2010-09-23 22:05:42 -04:00
Russ Cox
da392d9136 build: no required environment variables
R=adg, r, PeterGo
CC=golang-dev
https://golang.org/cl/1942044
2010-08-18 10:08:49 -04:00
Kyle Consalus
8fcdc6a1e2 Small performance improvements to the HTML tokenizer based on your 'TODO's.
R=nigeltao_golang
CC=golang-dev
https://golang.org/cl/1941042
2010-08-12 09:45:34 +10:00
Nigel Tao
56b989f1b9 First cut of an HTML tokenizer (and eventually a parser).
R=r, rsc, gri, rsc1
CC=golang-dev
https://golang.org/cl/1814044
2010-08-10 16:08:21 +10:00
Nigel Tao
43b3a247d3 html: sync testdata/webkit to match WebKit tip.
R=rsc
CC=golang-dev
https://golang.org/cl/1701041
2010-06-15 09:07:47 +10:00
Nigel Tao
64784801cd HTML5 parser test data from WebKit.
R=rsc
CC=golang-dev
https://golang.org/cl/1559041
2010-06-04 17:47:22 -07:00