Skip to content

Feature Request: RewriteRules with dom manipulation instead of regexp #1025

@kairos666

Description

@kairos666

First of all, BrowserSync is awesome :)
Second, hopefully this feature is already feasible therefore it is a noob question.

problem

I proxy an external URL and need to modify HTML requests on the fly (I don't have access to this external HTML source). So at the end, on the browser, I should get a mix of the proxied HTML and my own.

RewriteRules gives me exactly this. problem solved! ... BUT ... working with regexp is really a pain. I need to select specific html tags and their content before rewriting them.

I would prefer an approach with a parsed DOM (jsdom, harmon/trumpet, ...) so that i can easily manipulate the HTML with jQuery like selectors. Unfortunately i couldn't find a recipe to do just that.

Any suggestions?

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