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

CQ.CreateFromFile issue with html attributes with epmty values which are converting into unsupported formtat. #162

Open
RajuA opened this issue Sep 5, 2014 · 1 comment

Comments

@RajuA
Copy link

RajuA commented Sep 5, 2014

Hi, empty html attbutes are converting in to unsupported format
Example:

<div itemscope="" itemtype="http://schema.org/Product" class="">

is parsed by csQuery as

<div itemscope itemtype="http://schema.org/Product" class>

which is causing problem in generating page markup in asp-net . Please help to fix this issue .

@rufanov
Copy link
Contributor

rufanov commented May 23, 2015

Well, for HTML it's totally valid format.

It's standard behavior of RenderAttribute() method inside FormatDefault class. There is no setting to disable this, and you can't override this method, because it's protected, but not virtual(which is little strange). You can override RenderElementInternal() method to format attributes output differently. Or you can implement your own IOutputFormatter from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants