Skip to content

Restrict local action URL validation to form elements #842

Description

@chubes4

Problem

WordPressSitePlan::assertNoLocalBrowserReferences() validates every HTML action attribute as a navigable browser URL, regardless of element name. Custom elements can legitimately use action as an enum.

A direct import of https://www.tasteandtravelitaly.com/blog.html contains <fb:like action="like">. The plan validator interprets like as an unresolved local form action and aborts compilation with unresolved_local_browser_reference.

This is a false positive. The action URL contract applies to <form>; the custom element attribute is Facebook widget metadata.

Expected contract

  • Validate action as a browser reference only on <form> elements.
  • Continue validating src, href, poster, srcset, style URLs, and serialized block URL fields as today.
  • Preserve fail-closed validation for unresolved local <form action> references established by Canonicalize local form actions through the WordPress route map #672.
  • Add deterministic coverage for both the custom-element false positive and a real unresolved form action.

Tracker integration: Automattic/studio#3952 and Automattic/static-site-importer#895.

AI assistance

OpenAI gpt-5.6-sol via OpenCode reproduced the direct import failure, traced the plan validator, and drafted this issue. Chris Huber remains responsible for the report and resulting changes.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions