Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug fix - str replacement with forward slash #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jason-zz
Copy link

when href="/", value of $link is forward slash symbol. All forward slashes in HTML like

will be replaced with tracking link and layout will be broken. Should search and replace '"/"'.

when href="/", value of $link is forward slash symbol. All forward slashes in HTML like </p> will be replaced with tracking link and layout will be broken. Should search and replace '"/"'.
@tractorcow
Copy link
Collaborator

Could this problem also appear elsewhere? Could /about-us and /about-us/staff end up replacing one another?

I suggest a better solution to this is to ensure that the replacement mechanism always replaces quoted strings, rather than just in this one condition.

@tractorcow
Copy link
Collaborator

Test cases please :)

@jason-zz
Copy link
Author

@tractorcow Yeah that may happen in that case, but I am not sure.
I agree that it should replaces quoted string.

A simple test case: add couple paragraphs, insert HomePage (URL segment must be '/') hyperlink, then add some more links.

@jason-zz
Copy link
Author

@tractorcow

My debug logs. http://shrib.com/7l5sHpeU

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants