Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DomCrawler][Form] Fix the exclusion of <template>#53826

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mpiot
Copy link
Contributor

@mpiotmpiot commentedFeb 7, 2024
edited
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix#53823
LicenseMIT

In the DomCrawler, the way to get fields via xPath avoid to find elements inside a<template> element:

<form><template><inputtype="text"name="not_selected_because_in_template"/></template><inputtype="text"name="selected_because_out_of_template"/></form>

But, it appear it also exclude form elements if the<form> is in a<template> (eg: in a<turbo-stream>), that bug-fix keep the previous behavior but allow the following:

<turbo-stream><template><form><inputtype="text"name="selected_because_in_turbo_stream_1"/><inputtype="text"name="selected_because_in_turbo_stream_2"/></form></template></turbo-stream>

As mentioned in#53823, an alternative should be to use[not(ancestor::template/ancestor::form)] in the xPath to allow:

<template><form><inputtype="text"name="selected_because_parent_is_form_1"/><inputtype="text"name="selected_because_parent_is_form_2"/></form></template>

@carsonbotcarsonbot added this to the6.4 milestoneFeb 7, 2024
@carsonbotcarsonbot changed the title[DomCrawler] [Form] Fix the exclusion of <template>[DomCrawler][Form] Fix the exclusion of <template>Feb 7, 2024
@nicolas-grekas
Copy link
Member

Thank you@mpiot.

@nicolas-grekasnicolas-grekas merged commitcff8011 intosymfony:6.4Feb 9, 2024
This was referencedFeb 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

3 participants
@mpiot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp