sfan5 wrote:How do you open a web browser from C++? (cross-platform & reliable)
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
Krock wrote:PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
Are clickable links in OpenOffice a security risk?
sfan5 wrote:PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
"No program should be allowed to open a web browser for the user, the user might still be using Internet Explorer 6.0"
Is this a joke?
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
sfan5 wrote:How do you open a web browser from C++? (cross-platform & reliable)
LazyJ wrote:So here's an idea. Add a login menu button that will display a plain-text (*.txt) file from the server. This plain-text file in a formspec would allow room for more information to be written and viewed (scrollbars are nice), detailing the "must know" stuff like the server's rules and code of conduct, locations of interest on the server, links (that the user would have to copy/paste or manually transcribe) to the server's Minetest.net forum threads, web pages, wiki's, etc.
This idea is not as convenient as clicking on a hyper-link and having a web browser pop-up but it would accomplish a good-sized portion of the purpose of going to a Minetest server's website all the while being a compromise between security concerns and user convenience.
PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
mauvebic wrote:I even heard that some people stopped using dot-matrix printers.
LazyJ wrote:So here's an idea. Add a login menu button that will display a plain-text (*.txt) file from the server. This plain-text file in a formspec would allow room for more information to be written and viewed (scrollbars are nice), detailing the "must know" stuff like the server's rules and code of conduct, locations of interest on the server, links (that the user would have to copy/paste or manually transcribe) to the server's Minetest.net forum threads, web pages, wiki's, etc.
#include "os.h"
#include <stdio.h>
#ifdef WIN32
#include <windows.h>
void os_launch_browser(const char *url)
{
fprintf(stderr, "INFO: Launching browser to open \"%s\"\n", url);
ShellExecute(0, "open", url, 0, 0, SW_SHOWDEFAULT);
}
#else
#include <unistd.h>
void os_launch_browser(const char *url)
{
fprintf(stderr, "INFO: Launching browser to open \"%s\"\n", url);
char prog[] = "/usr/bin/xdg-open";
char url2[1000];
snprintf(url2, 1000, "%s", url);
char *argv[3];
argv[0] = prog;
argv[1] = url2;
argv[2] = NULL;
pid_t pid = fork();
if(pid == 0){
execvp(prog, argv);
_exit(1);
}
}
#endif
PilzAdam wrote:Krock wrote:PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
Are clickable links in OpenOffice a security risk?
AFAIK the link is displayed and you need to Ctrl + click.sfan5 wrote:PilzAdam wrote:What about security? I heard some people have Javascript enabled by default in their browsers.
"No program should be allowed to open a web browser for the user, the user might still be using Internet Explorer 6.0"
Is this a joke?
See above; the link should be displayed.
Jordach wrote:Minecraft already shows the link and prompts on opening said link, so that's a no brainer, it also allows disabling the option to open links as well as opening in default browser and always open links on click (ignores the prompt, can be set to do nothing on link click), which could possibly implemented easily and safely.
prestidigitator wrote:But I have a simpler solution than worrying about browsers, and it takes care of more than being able to visit a URL. Fix the clipboard itegration. Then URLs can be displayed and copied to the browser, even if it doesn't quite give the ease of single-click navigation. They could also be copied from the browser to chat, and to formspecs. Also, allow text to be selected in the console (F10). That way text could be copied OUT of chat, too. Not to mention that it would help here with debugging.
Users browsing this forum: No registered users and 5 guests