Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: 9.0 remove leftover manual context path string operations #3731

Open
mhsdesign opened this issue Mar 2, 2024 · 1 comment
Open

TASK: 9.0 remove leftover manual context path string operations #3731

mhsdesign opened this issue Mar 2, 2024 · 1 comment

Comments

@mhsdesign
Copy link
Member

With #2178 we moved into a direction of rather fetching context paths from the server than manually guessing them in the client.

The current 9.0-dev still shows 21 references to code like .split('@')

const contextString = this.props.siteNodeContextPath.split('@')[1];
const subject = `${this.props.options.createNew.path}@${contextString}`;

This will probably lead to hard to discover bugs, so we should rather make sure to NEVER manipulate the contextPath in the client. (possibly even by restricting the split operation? but at least by going through the code while looking at .split('@')

@grebaldi grebaldi changed the title BUG? 9.0 remove leftover manual context path string operations TASK: 9.0 remove leftover manual context path string operations Mar 13, 2024
@mhsdesign
Copy link
Member Author

mhsdesign commented Mar 15, 2024

yield call([history, history.replaceState], {}, '', `?node=${encodeURIComponent(action.payload.documentNode)}`);
might also be broken on 9.0

and logic such

const internalLinks = iframe.contentWindow.document.querySelectorAll('a[href*="@user-"]');

as well

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

No branches or pull requests

2 participants