Skip to content

Stray double-quote in simple-layout div tag (File, Group, Password) #205

Description

@rvanbaalen

Summary

Three classes contain an identical stray \" after the __getMetaString() call in their simple-layout rendering branch, producing invalid HTML like <div class="vf__multifielditem""> (note the extra ").

Affected files

classes/ValidFormBuilder/File.php:129:     $strOutput = "<div{$this->__getMetaString()}\">\n";
classes/ValidFormBuilder/Group.php:153:    $strOutput = "<div{$this->__getMetaString()}\">\n";
classes/ValidFormBuilder/Password.php:167: $strOutput = "<div{$this->__getMetaString()}\">\n";

All three are in the else (simple-layout) branch of __toHtml().

Expected fix

Remove the stray \" in each file:

- $strOutput = "<div{$this->__getMetaString()}\">\n";
+ $strOutput = "<div{$this->__getMetaString()}>\n";

Impact

Low. Browsers tolerate the extra quote character, but it produces invalid HTML that may confuse DOM parsers, accessibility tools, or strict HTML validators.

Discovered while writing unit tests in #154.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions