Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid char before tag content isn't caught #40

Closed
renanbr opened this issue Nov 7, 2017 · 0 comments
Closed

invalid char before tag content isn't caught #40

renanbr opened this issue Nov 7, 2017 · 0 comments

Comments

@renanbr
Copy link
Owner

renanbr commented Nov 7, 2017

Parser ignores non-valid characters when reading tag's content.

use RenanBr\BibTexParser\Listener;
use RenanBr\BibTexParser\Parser;

$parser = new Parser();
$listener = new Listener();
$parser->addListener($listener);
$parser->parseString('@misc{foo=)"bar"}');
$entries = $listener->export();
print_r($entries);

Expected result:

An exception saying ) character was not expected

Actual result:

Array
(
    [0] => Array
        (
            [type] => misc
            [foo] => bar
            [_original] => @misc{foo=)"bar"}
        )
)
renanbr added a commit that referenced this issue Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant