Skip to content

Strip option text#268

Merged
gawel merged 2 commits intoPylons:mainfrom
azmeuk:trim-options
May 14, 2025
Merged

Strip option text#268
gawel merged 2 commits intoPylons:mainfrom
azmeuk:trim-options

Conversation

@azmeuk
Copy link
Member

@azmeuk azmeuk commented May 5, 2025

When <option> tags are indented in HTML output, the inner text technically contains carriage returns and space characters.

Test assertions generally want to ignore those spaces, and check the actual text.

<select name="select">
    <option>
        foobar
    </option>
</select>

Without this patch, form["select"].options value would be \n foobar\n , with the patch it is simply foobar.

@gawel gawel merged commit b005ff4 into Pylons:main May 14, 2025
14 checks passed
@azmeuk azmeuk deleted the trim-options branch May 14, 2025 13:39
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

Successfully merging this pull request may close these issues.

2 participants