I want to use the question mark in the auto-genera

2019-09-05 07:03发布

I want to use the question mark the automatically generated path aliases, but when I write the question mark, it is changed to %3f.

How can I fix this?

3条回答
冷血范
2楼-- · 2019-09-05 07:19

The URL you are trying to use appears to be used as a proper delimiter of path vs. query string. You should not attempt to add the question mark yourself, but instead implement the section after the question mark as query string. For example:

l(t('My Link'), 'campaign/resurfacing-seminar', array(
  'query' => array(
    'campid' => '70150000000Tbdk',
    'eloqua' => 'SEM-110604-SyracuseNY-Lowe',
  ),
));
查看更多
爷、活的狠高调
3楼-- · 2019-09-05 07:37

You really can't if you want things to work correctly. The "?" is a special character that signifies the end of the URI and the beginning of the query string. Doing what you suggest would break a lot of your other drupal pages.

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-09-05 07:44

Drupal's url() function is better if you are incorporating it in a form action or a drupal_goto() function.

Here is the link to the function explanation: http://api.drupal.org/api/drupal/includes--common.inc/function/url/6

查看更多
登录 后发表回答