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

False positive for table headers when extra whitespace is present #529

Closed
bagofarms opened this issue May 18, 2020 · 0 comments · Fixed by #538
Closed

False positive for table headers when extra whitespace is present #529

bagofarms opened this issue May 18, 2020 · 0 comments · Fixed by #538
Labels
Milestone

Comments

@bagofarms
Copy link
Member

bagofarms commented May 18, 2020

Indiana University has reported false positives for tables that already have headings caused by empty spaces being seen as child nodes by libxml, specifically evident when checking for tags as first child of tags as in quail’s accessibility_tests.php

I have not been able to replicate the issue so far, but I have inquired about example code.

Erik Scull from IU recommends placing the following code after $this->prepareValue(); in:
https://github.com/ucfopen/UDOIT/blob/master/lib/quail/quail/quail.php#L165

function prepareDOM()
	{
		$this->prepareValue();
		$this->is_valid = @$this->dom->loadHTML('<?xml encoding="utf-8" ?>' . $this->value);
		$this->prepareBaseUrl($this->value, $this->type);
	}

$this->value = preg_replace("/\>\s+\</m", "><", $this->value);

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

Successfully merging a pull request may close this issue.

1 participant