Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: Alloc on January 22, 2017, 07:04:43 AM
-
Hi all,
have been looking around a lot and could not find any answer to this question ...
I want to use the MOTD Generator and want to have clickably hyperlinks to custom URLs in a text section. Of course I could use a MOTD URL and design my own MOTD page, but then I couldn't use the other nice features of the generator like the User List for Admins or the list of installed addons.
I tried a few different markups in the text but none of these worked:
<a href="myurl">text</a>
<a>myurl</a>
[url=myurl]text[/url]
[url]myurl[/url]
So is there any way to get hyperlinks working in text sections or is that simply impossible to achieve?
Kind regards and thanks for this really great admin tool :)
Chris
My ULib/ULX versions (run "ulx version" in console):
ULib v.2.61
ULX v.3.71
Game mode(s) I am having this problem on: TTT
-
The text section is probably stripping any markup. I'm not 101% sure, but I don't think it's possible.
-
Hmm ... as this is an admin thing anyway, why would there be a need for stripping markup?
-
I'm still not quite sure what you are asking.
Are you using the MOTD generator in the ULX menu (XGUI)?
The text fields escape entry so that whatever you type into them is displayed exactly as you type it.
If you want to do fancy custom stuff, you'll need to design your own page.
-
Adding a hyperlink isn't fancy in my books ;)
As I said I could do my own page but then I wouldn't be able to use the user list and addon list from ULX's MOTD generator so that's not really an option either.
I just want to be able to have a section in the MOTD Generator where I can put something like "Uses Workshop content from <a href="workshop url">this collection[/url]" and a few more links. Currently users have to copy+paste that text, simply being able to click on that link would be way nicer obviously.
-
I'll be honest. I've never used the generator. Let me fire it up and see what you're talking about. :)
-
Okay, yes I see what you're talking about now.
It appears that the MOTD (if using the generator) just reads raw text for text sections.
It might be a neat idea to add an HTML section in addition to a Text Section so that it'll correctly parse HTML, but that's something Stickly will have to look into as he is the developer of XGUI (the Menu used to edit) I also believe he designed the MOTD Generator.
-
As it turns out, we intentionally strip HTML tags for security reasons. Once you generate an MOTD with the generator, its saved as a data file in your data folder.
A malicious script could easily come in and inject some hidden HTML into your MOTD and you might never know.
We're discussing adding some whitelisted html tags for links and images.
-
A malicious script could easily come in and inject some hidden HTML into your MOTD and you might never know.
Ah yeah, that makes perfect sense as the file would still be owned by the game process ... :(
We're discussing adding some whitelisted html tags for links and images.
That would be really awesome 8)