Git Product home page Git Product logo

streamhtmlparser's Issues

parser javascript quote state problem

What steps will reproduce the problem?
1. source code:
int main(void){
    unsigned int getchar_ret;
    htmlparser_ctx *parser = htmlparser_new();
    int js_stat = 0;    
    while((getchar_ret = getchar()) != EOF){
        char c = (char)getchar_ret;
        htmlparser_parse_chr(parser, c);
  if (parser->in_js == 1) { 
    putchar(c);
    js_stat = htmlparser_js_state(parser);
        printf("js stat is %d\n",js_stat);
        }       
    else{   
//  putchar(c);
    }
    }
}
2. Input:
<script type="text/javascript"> 
  document.write("<img src='www.example.com' border=0 width=0 height=0>");
</script>
3. The parser state of string"<img src='www.example.com' border=0 width=0 
height=0>" is 2(JSPARSER_STATE_DQ).

What is the expected output? What do you see instead?
The parser state of string 'www.example.com' expect to be 1(JSPARSER_STATE_Q).

What version of the product are you using? On what operating system?

Version:0.1
OS: linux FC5

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 10 Jan 2011 at 10:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.