Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for isInScriptLiteral (0.42 sec)

  1. src/html/template/context.go

    		return true
    	}
    	return false
    }
    
    // isInScriptLiteral returns true if s is one of the literal states within a
    // <script> tag, and as such occurrences of "<!--", "<script", and "</script"
    // need to be treated specially.
    func isInScriptLiteral(s state) bool {
    	// Ignore the comment states (stateJSBlockCmt, stateJSLineCmt,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 16 03:29:27 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  2. src/html/template/transition.go

    	if c.element != elementNone {
    		// script end tags ("</script") within script literals are ignored, so that
    		// we can properly escape them.
    		if c.element == elementScript && (isInScriptLiteral(c.state) || isComment(c.state)) {
    			return c, len(s)
    		}
    		if i := indexTagEnd(s, specialTagEndMarkers[c.element]); i != -1 {
    			return context{}, i
    		}
    	}
    	return c, len(s)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 19:54:31 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  3. src/html/template/escape.go

    				cs -= 2
    			} else if c1.state == stateJSHTMLCloseCmt {
    				// "-->" instead of "/*" or "//"
    				cs -= 1
    			}
    			b.Write(s[written:cs])
    			written = i1
    		}
    		if isInScriptLiteral(c.state) && containsSpecialScriptTag(s[i:i1]) {
    			b.Write(s[written:i])
    			b.Write(escapeSpecialScriptTags(s[i:i1]))
    			written = i1
    		}
    		if i == i1 && c.state == c1.state {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 15:18:39 UTC 2023
    - 32.4K bytes
    - Viewed (0)
Back to top