~sircmpwn/visurf-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[PATCH] Handle IPv4 addresses in urlfilter

Martin Vahlensieck <git@academicsolutions.ch>
Details
Message ID
<20220110102544.4754-1-git@academicsolutions.ch>
DKIM signature
missing
Download raw message
Patch: +3 -0
---
 tools/urlfilter | 3 +++
 1 file changed, 3 insertions(+)
 mode change 100644 => 100755 tools/urlfilter

diff --git a/tools/urlfilter b/tools/urlfilter
old mode 100644
new mode 100755
index f0019f2d3..c9b2b596e
--- a/tools/urlfilter
+++ b/tools/urlfilter
@@ -38,5 +38,8 @@ function escape(str, c, len, res) {
# Treat alpha.alpha/... as an http:// URL
/^([a-z]+\.)?[a-z]+\.[a-z]+\/?.*/ { print "https://" $0; next }

# IPv4 Addresses
/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[:\/].*$/ { print "http://" $0; next }

# Open everything else as a search
{ print "https://html.duckduckgo.com/html?q=" escape($0); next }
-- 
2.30.2

[PATCH] Use %s format instead of passing string directly

Martin Vahlensieck <git@academicsolutions.ch>
Details
Message ID
<20220110102544.4754-2-git@academicsolutions.ch>
In-Reply-To
<20220110102544.4754-1-git@academicsolutions.ch> (view parent)
DKIM signature
missing
Download raw message
Patch: +2 -2
---
 frontends/visurf/window.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/frontends/visurf/window.c b/frontends/visurf/window.c
index a4a6bbec8..3680ed43c 100644
--- a/frontends/visurf/window.c
+++ b/frontends/visurf/window.c
@@ -317,7 +317,7 @@ static int
draw_error_statusbar(struct nsvi_window *win, struct pool_buffer *buf)
{
	int width, height;
	get_text_size(buf->cairo, config.font, &width, &height, NULL, win->error_message);
	get_text_size(buf->cairo, config.font, &width, &height, NULL, "%s", win->error_message);

	cairo_set_source_u32(buf->cairo, config.status.error.bg);
	cairo_rectangle(buf->cairo, 0, win->height - (config.margin * 2 + height),
@@ -326,7 +326,7 @@ draw_error_statusbar(struct nsvi_window *win, struct pool_buffer *buf)

	cairo_set_source_u32(buf->cairo, config.status.error.fg);
	cairo_move_to(buf->cairo, config.margin, win->height - height - config.margin);
	pango_printf(buf->cairo, config.font, win->error_message);
	pango_printf(buf->cairo, config.font, "%s", win->error_message);
	return height + config.margin * 2;
}

-- 
2.30.2

Re: [PATCH] Use %s format instead of passing string directly

Details
Message ID
<CH1X8JLTCG0G.I45A89UB4PKY@taiga>
In-Reply-To
<20220110102544.4754-2-git@academicsolutions.ch> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/visurf
   0cad23641..ed7001c64  master -> master
Details
Message ID
<CH1X8K60YEH3.1HOSPHCI6V7VU@taiga>
In-Reply-To
<20220110102544.4754-1-git@academicsolutions.ch> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/visurf
   0cad23641..ed7001c64  master -> master
Reply to thread Export thread (mbox)