-
Notifications
You must be signed in to change notification settings - Fork 46
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
Using html #2
Comments
Could you show me some code snippet example? Let's discuss based on code. |
Example:
Currently it just renders the html markup as text, because in the code you're using innerText (https://github.com/rhysd/electron-about-window/blob/master/src/renderer.ts#L30) |
Thanks. I think implementation is very simple as you said. Let me think if there is no risk about XSS because of setting inner HTML. |
I noticed that your example doesn't work. Regarding to your use case, is it also acceptable to add 'See more' link to description? |
I added a link to application's homepage to application's name instead of adding 'see more' to description because longer description may break the layout. Change is 1e0f5e6. Does it meet your usecase? |
Oh I see. That sounds like a nice addition too (the link.) Actually the link wasn't a particular use case, more an example. It was more that it would be nice to be able to add custom HTML block, if someone needs to write some more text with formatting in their about page. |
OK, I think we can use |
openAboutWindow({
icon_path: join(__dirname, 'icon.png'),
copyright: 'Copyright (c) 2015 rhysd',
description: 'Hello, world <a href="https://github.com" class="link">(see more)</a>'
}) now opens a window like below: I added I published v1.5.0. |
Great! thanks! However I think changing from innerText to innerHtml is a breaking change, so we should either bump version to 2.0.0 or introduce a flag in order to use innerHtml instead of innerText. |
Hmm... I think adding new property is better because innerHTML is dangerous. In the case, current behavior is not broken. I'll unpublish 1.5.0 and add |
You can have useInnerHtml property in 1.5 as well, as long as it defaults to innerText, because then it is backwards compatible :) |
Following semantic versioning, we need to up minor version because it's a new feature without breaking change. Anyway, I already published v1.6.0 👍 |
Nice module!
Would be nice to have the option to put HTML inside the attributes (like description)
The text was updated successfully, but these errors were encountered: