- 26 Sep, 2011 14 commits
-
-
Rob Pike authored
Fixes #2301. R=golang-dev, gri CC=golang-dev https://golang.org/cl/5134048
-
Russ Cox authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5127042
-
Russ Cox authored
Case-insensitive strcmp without using ToLower. (Using ToLower is not always correct, and it allocates.) R=golang-dev, r CC=golang-dev https://golang.org/cl/5143044
-
Russ Cox authored
Also work around Mercurial issue 3023. If anyone has local changes in their repo (due to patch queues or whatever) stop them from leaking into the main repository. R=golang-dev, r CC=golang-dev https://golang.org/cl/5144043
-
Russ Cox authored
Also reject literal newline in " and ' quoted strings. R=golang-dev, r CC=golang-dev https://golang.org/cl/5139045
-
Russ Cox authored
The 512 MB array causes load delays on some systems. Now that we have recover, we can do all the tests in one binary, so that the delay is incurred just once. R=golang-dev, r CC=golang-dev https://golang.org/cl/5142044
-
Russ Cox authored
Alex Brainman reports that this is the only test that keeps us from running test/run. R=alex.brainman, lucio.dere, bradfitz, hectorchu CC=golang-dev https://golang.org/cl/4777043
-
Russ Cox authored
R=r CC=golang-dev https://golang.org/cl/5131044
-
Russ Cox authored
Fixes #2277. R=dvyukov, r CC=golang-dev https://golang.org/cl/5083044
-
Dave Cheney authored
R=agl CC=golang-dev https://golang.org/cl/5132041
-
Mike Samuel authored
This makes sure that all JS newlines are encoded in JSON. It also moots a TODO about possibly escaping supplemental codepoints. I served: Content-Type: text/javascript;charset=UTF-8 var s = "%s"; document.write("<p>", s, "</p><ol>"); for (var i = 0; i < s.length; i++) { document.write("<li>", s.charCodeAt(i).toString(16), "</li>"); } document.write("</l>"); where %s was replaced with bytes "\xf0\x9d\x84\x9e" to test straight UTF-8 instead of encoding surrogates separately. Recent Firefox, Chrome, and Safari all decoded it properly. I have yet to try it on IE or older versions. R=nigeltao CC=golang-dev https://golang.org/cl/5129042
-
Mike Samuel authored
The template "<a=" caused an infinite loop in escape text. The change to tTag fixes that and the change to escape.go causes escapeText to panic on any infinite loop that does not involve a state cycle. R=nigeltao CC=golang-dev https://golang.org/cl/5115041
-
Mike Samuel authored
HTML parsers may differ on whether <input id= onchange=f( ends in id's or onchange's value, <a class=`foo ends inside a value, <input style=font:'Arial' needs open-quote fixup. Per http://www.w3.org/TR/html5/tokenization.html#attribute-value-unquoted-state this treats the error cases in 8.2.4.40 Attribute value (unquoted) state as fatal errors. \> U+0022 QUOTATION MARK (") \> U+0027 APOSTROPHE (') \> U+003C LESS-THAN SIGN (<) \> U+003D EQUALS SIGN (=) \> U+0060 GRAVE ACCENT (`) Parse error. Treat it as per the "anything else" entry below. and emits ErrBadHTML. R=nigeltao CC=golang-dev https://golang.org/cl/5085050
-
Mike Samuel authored
R=nigeltao CC=golang-dev https://golang.org/cl/5128041
-
- 25 Sep, 2011 2 commits
-
-
Gustavo Niemeyer authored
R=golang-dev, rsc, adg CC=golang-dev https://golang.org/cl/5124044
-
David G. Andersen authored
The example incorrectly dereferenced an integer variable R=golang-dev, adg CC=golang-dev https://golang.org/cl/5129041
-
- 24 Sep, 2011 2 commits
-
-
Ian Lance Taylor authored
bug340.go:14:7: error: expected type bug340.go:15:4: error: reference to undefined field or method ‘x’ bug350.go:12:1: error: redefinition of ‘m’ bug350.go:11:1: note: previous definition of ‘m’ was here bug350.go:15:1: error: redefinition of ‘p’ bug350.go:14:1: note: previous definition of ‘p’ was here bug351.go:12:6: error: non-name on left side of ‘:=’ R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5127041
-
Jaroslavas Počepko authored
syscall: mksyscall_windows.pl to produce packages other than syscall (for example pkg/exp/wingui/zwinapi.go) R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/4964074
-
- 23 Sep, 2011 9 commits
-
-
Brad Fitzpatrick authored
Fixes #2300 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5117041
-
Mike Samuel authored
R=nigeltao CC=golang-dev https://golang.org/cl/5076049
-
Eric Eisner authored
R=gri, jeff CC=golang-dev https://golang.org/cl/5040048
-
Mikio Hara authored
R=golang-dev, fullung, dave, rsc CC=golang-dev https://golang.org/cl/5081044
-
Mikio Hara authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5039042
-
Mikio Hara authored
R=fullung, rsc CC=golang-dev https://golang.org/cl/5034044
-
Luuk van Dijk authored
The Dwarf info has the full typenames, the go *struct runtime.commonType has the short name. A more permanent fix would link the two together but this way the user gets useable stack traces for now. R=rsc CC=golang-dev https://golang.org/cl/5097046
-
Alex Brainman authored
Fixes #2250. R=golang-dev, hectorchu CC=golang-dev, vincent.vanackere https://golang.org/cl/5086050
-
Fumitoshi Ukai authored
One benefit of websocket is that it is full-duplex so that it could send and receive at the same time. This CL makes websocket goroutine safe, so user could use websocket both on goroutine for read and on goroutine for write. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5058043
-
- 22 Sep, 2011 8 commits
-
-
Paul Sbarra authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5043046
-
Andrew Gerrand authored
R=golang-dev, r CC=golang-dev https://golang.org/cl/5086048
-
Andrew Gerrand authored
R=dsymonds CC=golang-dev https://golang.org/cl/5086049
-
Andrew Gerrand authored
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5075050
-
Mike Samuel authored
When templates are stored in external files, developers often embed comments to explain&|disable code. <!-- Oblique reference to project code name here --> {{if .C}}...{{else}}<!-- commented out default -->{{end}} This unnecessarily increases the size of shipped HTML and can leak information. This change elides all comments of the following types: 1. <!-- ... --> comments found in source. 2. /*...*/ and // comments found in <script> elements. 3. /*...*/ and // comments found in <style> elements. It does not elide /*...*/ or // comments found in HTML attributes: 4. <button onclick="/*...*/"> 5. <div style="/*...*/"> I can find no examples of comments in attributes in Closure Templates code and doing so would require keeping track of character positions post decode in <button onclick="/*...*/"> To prevent token joining, /*comments*/ are JS and CSS comments are replaced with a whitespace char. HTML comments are not, but to prevent token joining we could try to detect cases like <<!---->b> </<!---->b> which has a well defined meaning in HTML but will cause a validator to barf. This is difficult, and this is a very minor case. I have punted for now, but if we need to address this case, the best way would be to normalize '<' in stateText to '<' consistently. The whitespace to replace a JS /*comment*/ with depends on whether there is an embedded line terminator since break/* */foo ... is equivalent to break; foo ... while break/**/foo ... is equivalent to break foo; ... Comment eliding can interfere with IE conditional comments. http://en.wikipedia.org/wiki/Conditional_comment <!--[if IE 6]> <p>You are using Internet Explorer 6.</p> <![endif]--> /*@cc_on document.write("You are using IE4 or higher"); @*/ I have not encountered these in production template code, and the typed content change in CL 4962067 provides an escape-hatch if conditional comments are needed. R=nigeltao CC=golang-dev https://golang.org/cl/4999042
-
David Symonds authored
R=golang-dev, adg CC=golang-dev, sbarra.paul https://golang.org/cl/5044045
-
Mike Samuel authored
This simplifies transition functions to make it easier to reliably elide comments in a later CL. Before: - transition functions are responsible for detecting special end tags. After: - the code to detect special end tags is done in one place. We were relying on end tags being skipped which meant we were not noticing comments inside script/style elements that contain no substitutions. This change means we will notice all such comments where necessary, but stripTags will notice none since it does not need to. This speeds up stripTags. R=nigeltao CC=golang-dev https://golang.org/cl/5074041
-
Ian Lance Taylor authored
bug363.go:13:12: error: invalid context-determined non-integer type for shift operand bug363.go:16:12: error: invalid context-determined non-integer type for shift operand pointer.go:34:6: error: incompatible type in initialization (pointer to interface type has no methods) pointer.go:36:6: error: incompatible type in initialization method2.go:15:1: error: invalid pointer or interface receiver type method2.go:16:1: error: invalid pointer or interface receiver type method2.go:21:1: error: invalid pointer or interface receiver type method2.go:22:1: error: invalid pointer or interface receiver type method2.go:28:15: error: type ‘*Val’ has no method ‘val’ method2.go:33:11: error: reference to undefined field or method ‘val’ shift1.go:19:16: error: invalid context-determined non-integer type for shift operand shift1.go:24:19: error: invalid context-determined non-integer type for shift operand shift1.go:25:17: error: invalid context-determined non-integer type for shift operand shift1.go:18:18: error: shift of non-integer operand shift1.go:26:13: error: floating point constant truncated to integer shift1.go:33:15: error: integer constant overflow shift1.go:34:15: error: integer constant overflow shift1.go:35:17: error: integer constant overflow R=golang-dev, r CC=golang-dev https://golang.org/cl/5081051
-
- 21 Sep, 2011 5 commits
-
-
Robert Griesemer authored
- also fixed bug: ReadFile never closed the file before - per suggestion by bradfitz R=bradfitz CC=golang-dev https://golang.org/cl/5092047
-
Robert Griesemer authored
R=r CC=golang-dev https://golang.org/cl/5089048
-
Robert Griesemer authored
R=r CC=golang-dev https://golang.org/cl/5077047
-
Gustavo Niemeyer authored
The documentation for bytes.Replace says it copies the slice but it won't necessarily copy them. Since the data is mutable, breaking the contract is an issue. We either have to fix this by making the copy at all times, as suggested in this CL, or we should change the documentation and perhaps make better use of the fact it's fine to mutate the slice in place otherwise. R=golang-dev, bradfitz, adg, rsc CC=golang-dev https://golang.org/cl/5081043
-
Brad Fitzpatrick authored
It's currently broken and disabled, pending a fix for Issue 2281. R=golang-dev, adg CC=golang-dev https://golang.org/cl/5092045
-