Warning: UPDATE command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_cache' query: UPDATE drupal_cache SET data = 'a:451:{s:13:\"theme_default\";s:7:\"garland\";s:13:\"filter_html_1\";i:1;s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}s:17:\"menu_primary_menu\";i:2;s:19:\"menu_secondary_menu\";i:2;s:15:\"install_profile\";s:7:\"default\";s:17:\"node_options_page\";a:1:{i:0;s:6:\"status\";}s:12:\"comment_page\";s:1:\"0\";s:18:\"drupal_private_key\";s:64:\"b4e640288de05f522bbe6b032bdd5e965244625713cbf8cf2021d99f2fe3072a\";s:19:\"file_directory_temp\";s:9:\"files/tmp\";s:19:\"file_directory_path\";s:5:\"files\";s:14:\"file_downloads\";s:1:\"1\";s:21:\"date_default_timezone\";s:4:\"7200\";s:22:\"configurable_timezones\";s:1:\" in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174) in /home/michelon/www/olivier/blog/includes/bootstrap.inc on line 569

Warning: Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174) in /home/michelon/www/olivier/blog/includes/bootstrap.inc on line 570

Warning: Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174) in /home/michelon/www/olivier/blog/includes/bootstrap.inc on line 571

Warning: Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174) in /home/michelon/www/olivier/blog/includes/bootstrap.inc on line 572

Warning: INSERT command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_watchdog' query: INSERT INTO drupal_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174)</em> in <em>/home/michelon/www/olivier/blog/includes/common.inc</em> on line <em>141</em>.', 2, '', 'http://olivier.michelon.me/blog/?q=article/maito-et-encodage-durl', '', '54.226.132.197', 1513211577) in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174

Warning: INSERT command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_watchdog' query: INSERT INTO drupal_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>UPDATE command denied to user &amp;#039;michelon01&amp;#039;@&amp;#039;10.0.126.188&amp;#039; for table &amp;#039;drupal_cache_browscap&amp;#039;\nquery: UPDATE drupal_cache_browscap SET data = &amp;#039;O:8:\\&amp;quot;stdClass\\&amp;quot;:2:{s:9:\\&amp;quot;useragent\\&amp;quot;;s:1:\\&amp;quot;%\\&amp;quot;;s:4:\\&amp;quot;data\\&amp;quot;;s:609:\\&amp;quot;a:25:{s:7:\\&amp;quot;browser\\&amp;quot;;s:15:\\&amp;quot;Default Browser\\&amp;quot;;s:7:\\&amp;quot;version\\&amp;quot;;s:1:\\&amp;quot;0\\&amp;quot;;s:8:\\&amp;quot;majorver\\&amp;quot;;s:1:\\&amp;quot;0\\&amp;quot;;s:8:\\&amp;quot;minorver\\&amp;quot;;s:1:\\&a in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174
Maito et encodage d'URL | MICHBlog

Maito et encodage d'URL

  • warning: Cannot modify header information - headers already sent by (output started at /home/michelon/www/olivier/blog/includes/database.mysql.inc:174) in /home/michelon/www/olivier/blog/includes/common.inc on line 141.
  • user warning: UPDATE command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_cache_browscap' query: UPDATE drupal_cache_browscap SET data = 'O:8:\"stdClass\":2:{s:9:\"useragent\";s:1:\"%\";s:4:\"data\";s:609:\"a:25:{s:7:\"browser\";s:15:\"Default Browser\";s:7:\"version\";s:1:\"0\";s:8:\"majorver\";s:1:\"0\";s:8:\"minorver\";s:1:\"0\";s:8:\"platform\";s:7:\"unknown\";s:5:\"alpha\";s:0:\"\";s:4:\"beta\";s:0:\"\";s:5:\"win16\";s:0:\"\";s:5:\"win32\";s:0:\"\";s:5:\"win64\";s:0:\"\";s:6:\"frames\";s:0:\"\";s:7:\"iframes\";s:0:\"\";s:6:\"tables\";s:0:\"\";s:7:\"cookies\";s:0:\"\";s:16:\"backgroundsounds\";s:0:\"\";s:10:\"javascript\";s:0:\"\";s:8:\"vbscript\";s:0:\"\";s:11:\"javaapplets\";s:0:\"\";s:15:\"activexcontrols\";s:0:\"\";s:8:\"isbanned\";s:0:\"\";s:14:\"ismobiledevice\";s:0:\"\";s:19:\"issyndicationreader\";s:0:\"\";s:7:\"crawler\";s:0:\"\";s:10:\"cssversion\";s:1:\"0\";s:10:\"aolversion\";s:1:\"0\";}\";}', created = 1513211577, expire = 0, headers = '' WHERE cid = 'CCBot/2.0 (http://commoncrawl.org/faq/)' in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174.

L'URL (Uniform Resource Locators) a été définie en décembre 1994 au CERN. Mais cette spécification pose problème: elle autorise l'utilisation d'un simple extrait de l'US-ASCII: "Thus, only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL."

En d'autres termes, les espaces, les caractères spéciaux ne sont pas autorisés dans l'écriture.

Heureusement, HTML 4 autorise l'utilisation ces caractères à partir de leurs traductions en hexadécimal depuis l'ISO-Latin (les 2 premiers digits seulement). Ils devront être introduits par un '%' dans une URL.

Caractère Code héxadécimal
espace E9
é 20
 & 26
+ 2B
, 2C
/ 2F
| 7C
\ 5C
: 3A
; 3B
< 3C
= 3D
> 3E
? 3F
@ 40
# 23
% 25
{ 7B
[ 5B
] 5D
} 7D
^ 5E
~ 7E
` 60
$ 24
Retour charriot 0D
Début de ligne 0A

Voici un exemple d'URL encodé :  http:///www.exemple.fr/mon%20fichier%20en%20pdf.pdf

Le mailto ("mail to") est un protocole internet qui permet de créer un lien de type URL exécutant le client de messagerie et démarrant l'écriture d'un mail avec des champs pré-remplies:

  • À * : destinataires du mail séparés par un ';'
  • cc : destinataires d'une copie du mail séparés par un ';'
  • bcc : destinataires d'une copie cachée du mail séparés par un ';'
  • subject : sujet du mail
  • body : corps du mail

Voici la structure HTML d'un lien mailto : <a href="mailto:<À>?cc=<cc>&bcc=<bcc>&subject=<subject>&body=<body>">Mon mail</a>

Dans ce cas là, l'utilisation de l'URL encodé s'avère fort utile. Voici un exemple complexe utilisant en même temps le retour à la ligne (combinaison du retour charriot et du début de ligne):

<a href="mailto:mail1@exemple.fr?cc=mail2@exemple.fr&bcc=mail3@exemple.fr&subject=Salut%20mes%20pots!&body=Bonjour%2C%0D%0AComment%20allez%20vous%3F">Mon mail</a>

A tester ici!

Syndiquer le contenu

Warning: INSERT command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_watchdog' query: INSERT INTO drupal_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>UPDATE command denied to user &amp;#039;michelon01&amp;#039;@&amp;#039;10.0.126.188&amp;#039; for table &amp;#039;drupal_node_counter&amp;#039;\nquery: UPDATE drupal_node_counter SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = 1513211577 WHERE nid = 36</em> dans <em>/home/michelon/www/olivier/blog/includes/database.mysql.inc</em> à la ligne <em>174</em>.', 2, '', 'http://olivier.michelon.me/blog/?q=article/maito-et-encodage-durl', '', '54.226.132.197', 1513211577) in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174

Warning: INSERT command denied to user 'michelon01'@'10.0.126.188' for table 'drupal_watchdog' query: INSERT INTO drupal_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>UPDATE command denied to user &amp;#039;michelon01&amp;#039;@&amp;#039;10.0.126.188&amp;#039; for table &amp;#039;drupal_sessions&amp;#039;\nquery: UPDATE drupal_sessions SET uid = 0, cache = 0, hostname = &amp;#039;54.226.132.197&amp;#039;, session = &amp;#039;messages|a:1:{s:5:\\&amp;quot;error\\&amp;quot;;a:1:{i:0;s:339:\\&amp;quot;user warning: UPDATE command denied to user &amp;amp;#039;michelon01&amp;amp;#039;@&amp;amp;#039;10.0.126.188&amp;amp;#039; for table &amp;amp;#039;drupal_node_counter&amp;amp;#039;\\nquery: UPDATE drupal_node_counter SET daycount = daycount + 1, totalcount = totalcount + 1, timestamp = 1513211577 WHERE nid = 36 in /home/michelon/www/olivier in /home/michelon/www/olivier/blog/includes/database.mysql.inc on line 174