chrome.omnibox.onInputEntered.addListener(
	function(searchText) {
		var docSubdir = localStorage['docSubdir']
		if (docSubdir == undefined) {
			docSubdir = 'qt-5' // Default to the latest version of Qt 5
		}

		var site = 'site:doc.qt.io/' + docSubdir + '/'
		chrome.tabs.create({'url': 'https://www.google.com/search?q=' + site + '+' + searchText})
	});


chrome.omnibox.onInputEntered.addListener(
	function(searchText) {
		var docSubdir = localStorage['docSubdir']
		if (docSubdir == undefined) {
			docSubdir = 'qt-5' // Default to the latest version of Qt 5
		}

		var site = 'site:doc.qt.io/' + docSubdir + '/'
		chrome.tabs.create({'url': 'https://www.google.com/search?q=' + site + '+' + encodeURIComponent(searchText)})
	});


Handle reserved characters in the search string
FIX: Handle reserved characters in the search string

Previously, "C++" would become "C" due to the lack of encoding/escaping
