Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for stateAttr (0.24 sec)

  1. src/html/template/state_string.go

    	var x [1]struct{}
    	_ = x[stateText-0]
    	_ = x[stateTag-1]
    	_ = x[stateAttrName-2]
    	_ = x[stateAfterName-3]
    	_ = x[stateBeforeValue-4]
    	_ = x[stateHTMLCmt-5]
    	_ = x[stateRCDATA-6]
    	_ = x[stateAttr-7]
    	_ = x[stateURL-8]
    	_ = x[stateSrcset-9]
    	_ = x[stateJS-10]
    	_ = x[stateJSDqStr-11]
    	_ = x[stateJSSqStr-12]
    	_ = x[stateJSTmplLit-13]
    	_ = x[stateJSRegexp-14]
    	_ = x[stateJSBlockCmt-15]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 15:18:39 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. src/html/template/context.go

    	stateHTMLCmt
    	// stateRCDATA occurs inside an RCDATA element (<textarea> or <title>)
    	// as described at https://www.w3.org/TR/html5/syntax.html#elements-0
    	stateRCDATA
    	// stateAttr occurs inside an HTML attribute whose content is text.
    	stateAttr
    	// stateURL occurs inside an HTML attribute whose content is a URL.
    	stateURL
    	// stateSrcset occurs inside an HTML srcset attribute.
    	stateSrcset
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 16 03:29:27 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  3. src/html/template/transition.go

    		c.state = stateTag
    		return c, i
    	}
    	c.state = stateBeforeValue
    	// Consume the "=".
    	return c, i + 1
    }
    
    var attrStartStates = [...]state{
    	attrNone:       stateAttr,
    	attrScript:     stateJS,
    	attrScriptType: stateAttr,
    	attrStyle:      stateCSS,
    	attrURL:        stateURL,
    	attrSrcset:     stateSrcset,
    }
    
    // tBeforeValue is the context transition function for stateBeforeValue.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 19:54:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  4. src/html/template/escape.go

    			// Therefore, it is safe to ignore these two node types.
    			continue
    		}
    		ident := node.Ident
    		if _, ok := predefinedEscapers[ident]; ok {
    			if pos < len(n.Pipe.Cmds)-1 ||
    				c.state == stateAttr && c.delim == delimSpaceOrTagEnd && ident == "html" {
    				return context{
    					state: stateError,
    					err:   errorf(ErrPredefinedEscaper, n, n.Line, "predefined escaper %q disallowed in template", ident),
    				}
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 15:18:39 UTC 2023
    - 32.4K bytes
    - Viewed (0)
  5. src/html/template/escape_test.go

    			"{{range .Items}}<a{{if .X}}{{continue}}{{end}}>{{end}}",
    			"z:1:29: at range loop continue: {{range}} branches end in different contexts",
    		},
    		{
    			"<a b=1 c={{.H}}",
    			"z: ends in a non-text context: {stateAttr delimSpaceOrTagEnd",
    		},
    		{
    			"<script>foo();",
    			"z: ends in a non-text context: {stateJS",
    		},
    		{
    			`<a href="{{if .F}}/foo?a={{else}}/bar/{{end}}{{.H}}">`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 16 03:29:27 UTC 2023
    - 56.2K bytes
    - Viewed (0)
  6. src/encoding/json/scanner.go

    }
    
    // stateT is the state after reading `t`.
    func stateT(s *scanner, c byte) int {
    	if c == 'r' {
    		s.step = stateTr
    		return scanContinue
    	}
    	return s.error(c, "in literal true (expecting 'r')")
    }
    
    // stateTr is the state after reading `tr`.
    func stateTr(s *scanner, c byte) int {
    	if c == 'u' {
    		s.step = stateTru
    		return scanContinue
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 16.1K bytes
    - Viewed (0)
Back to top