Skip to content

Update zap.py #33

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

Closed
wants to merge 1 commit into from
Closed

Update zap.py #33

wants to merge 1 commit into from

Conversation

stude1
Copy link

@stude1 stude1 commented Jan 19, 2022

Spaces are not allowed in HTML attribute names. This space messes up the log file.

Spaces are not allowed in HTML attribute names. This space messes up the log file.
@Tattoo
Copy link
Contributor

Tattoo commented Jan 19, 2022

@stude1 ,

Hi, could you elaborate a bit what do you mean with this PR? Site is not an HTML attribute name and I don't know what you mean by messing up the log file.

@stude1
Copy link
Author

stude1 commented Jan 19, 2022

That field contains the suite name e.g. "Site: http://127.0.0.1". When the log.html is generated from this output XML with rebot, the index table of the log.html will have titles where there is parent and the suite names, ending up in a name attribute of http. With a space after 'Site:' the http link will appear there also before the parent name, including a '>' at the end which looks pretty awkward. Removing the space fixes the problem, i.e. we get only parent name + suite name like expected.

The field contains also other characters that are not allowed, but those are not causing trouble:
https://stackoverflow.com/questions/925994/what-characters-are-allowed-in-an-html-attribute-name

There is also another possibility: when there is an http address in the attribute, that will be automatically converted to a link and a copy of that is added as text next to it. Corrupting the address in some way fixes also the problem.

Hope this helps. I can give a demo tomorrow if needed.

@Tattoo
Copy link
Contributor

Tattoo commented Jan 19, 2022

Ah, I now see the problem. Great catch!

This problem is much wider than just with Zap, as any suite name with unsafe HTML characters translated by Oxygen will cause similar things to happen. Therefore, the solution presented in this PR only fixes the issue for specifically here, where the offending suite name has an URL in it.

I have opened #34 where we will solve this issue. Do you mind @stude1 if we don't accept this PR as a fix?

@stude1
Copy link
Author

stude1 commented Jan 20, 2022

No problem!

@stude1 stude1 closed this Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants