cppcms-users Mailing List for CppCMS C++ Web Framework (Page 5)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Artyom B. <art...@gm...> - 2019-01-01 11:00:29
|
This is good question. I have the C++11 update at the roadmap for CppCMS 2.0. One if the issues I can't do it for CppCMS 1.4 or something like that is because removing of auto_ptr will break backward compatibility. CppCMS is C++11 friendly. The only current incompatibility is auto_ptr. Currently you can always hide deprecated warnings. Also I think that moving to c++11 may be higher priority that it is now. Artyom On Fri, Dec 28, 2018 at 10:44 PM Andrew Marlow <mar...@gm...> wrote: > > Hello, > > I see this on the roadmap and wonder what progress has been made. I am thinking about possibly using cppcms in a linux env with the gcc 8.2.1 compiler. I plan to use the option -std=gnu++17. Use of auto_ptr with that compiler gives deprecation warnings. Using C++17 ought to give errors since auto_ptr has been removed from C++17 but gcc still just gives the warning. I expect that to be fixed soon. When it is that means game over for cppcms, which is why I am keen to find out what the plans are please. > > -- > Regards, > > Andrew Marlow > http://www.andrewpetermarlow.co.uk > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: Andrew M. <mar...@gm...> - 2018-12-28 20:44:18
|
Hello, I see this on the roadmap and wonder what progress has been made. I am thinking about possibly using cppcms in a linux env with the gcc 8.2.1 compiler. I plan to use the option -std=gnu++17. Use of auto_ptr with that compiler gives deprecation warnings. Using C++17 ought to give errors since auto_ptr has been removed from C++17 but gcc still just gives the warning. I expect that to be fixed soon. When it is that means game over for cppcms, which is why I am keen to find out what the plans are please. -- Regards, Andrew Marlow http://www.andrewpetermarlow.co.uk |
From: Martin B. <mar...@gm...> - 2018-12-16 22:06:31
|
Hi there, I wrote the issue #22 back in the day. I said that "I am working on a fix for [it]" but haven't done anything since then, because the project I used cppcms for got suspended. Now I use cppcms for something else and ran into the same problem. I'd like to discuss a possible solution before submitting a PR. How about checking if seq_name contains a opening parenthesis '('? When a '(' is encountered there is most likely a function call involved. There may not, but this would be a corner case when a '(' is still needed (none of which come to my mind as of now). I propose to adapt the foreach syntax as follows: 'foreach' NAME ['as' IDENTIFIER ] [ 'rowid' IDENTIFIER [ 'from' NUMBER ] ] [ 'reverse' ] 'in' ['direct' | 'smart'] VARIABLE where 'direct' forces the old generation of C++ code (and being the default for backwards compatibility) and 'smart' (for the lack of a better term) checks for '(' and if present changes the code generation to output a stack variable for the call embedded in seq_name. I am thinking of something like: decltype(seq_name) v_ident = seq_name; and subsequently changing for (ptr_type ident_ptr = seq_name.begin [...] to for (ptr_type ident_ptr = v_ident.begin [...] I have attached a diff of my proposed changes to the tmpl_cc. Looking forward to your reply, Martin Bürgmann |
From: Stoyan B. <sv...@ab...> - 2018-11-08 07:03:13
|
Hello everyone, I am trying to run the hello world app on h2o web server by I am having hard time to communicate the application with the web server.I've tried to spawn the process which I would greatly prefere and I've tried to connect to the process of the app over unix socket.Both ways not successfully. Any help how to make this work would be highly apriciated. Best regards |
From: Artyom B. <art...@gm...> - 2018-11-05 07:09:08
|
> Now, let's consider this situation: > - Attacker gets all information about the form by inspecting HTML code. > - Then post form data with cURL without any session cookie values and hidden "_csrf" variable and header. > In this case, CppCMS will consider these requests as new session. But since "_csrf" value in the session is not generated until the response is written back; CSRF validation will succeed silently. > It is correct behavior. CSRF is an attempt to use victims credentials to perform operations on his behalf. For each POST request there are two kinds of things you want to check: 1. The user has permissions to perform an operation - for example add/update content. 2. It is actually POST by user and not CSRF. Now if you want to protect a general form from accessing by users that hadn't seen the form from browser just create a session - call it anonymous - session will include token. However, everything that anonymous user can do attacker can do as well by just obtaining his own session cookie. CSRF protection does not protect against general POSTs, it protects uses who logged in against forgery. > Maybe, if we should change validate_csrf_token's logic as: > - if session[_csrf] empty, then return false. > - if token is empty, then return false. > - if session[_csrf] == token, return true; otherwise return false. The problem it will fail various kind of forms that do not actually require any session. > After this change, if the session is new and it's POST method and form::load is called; CSRF validation will throw an exception (as expected). > > In the current situation, it seems that there is cross-site forgery attack possibility in very specific cases. But I am not sure if this is feature or bug. > > Thank you. > > Best regards, > Nazim Can. > > -- > С уважением, > Назым-Джан Бэдир Regards, Artyom |
From: Nazim C. B. <naz...@ne...> - 2018-10-18 16:23:40
|
Hello Artyom,<div><br /></div><div>I came across to interesting situation while stress testing an application using CppCMS. Could you please provide your thoughts about the issue?</div><div><br /></div><div>- While doing CSRF validation, CppCMS is using "_csrf" value from the session.</div><div>- The "_csrf" value itself is generated in session_interface::save member function for new sessions.</div><div>- Validation will succeed if "_csrf" session value is empty or "_csrf" session value equals to "_csrf" POST data (or header value).</div><div><br /></div><div>In normal situations, this works as expected because the form must be rendered before it is submitted. In the first GET request, session is initialized and "_csrf" value is set. In the subsequent requests, the _csrf value will exist in the session; thus validation will be in place.</div><div><br /></div><div>Now, let's consider this situation:</div><div>- Attacker gets all information about the form by inspecting HTML code.</div><div>- Then post form data with cURL without any session cookie values and hidden "_csrf" variable and header.</div><div>In this case, CppCMS will consider these requests as new session. But since "_csrf" value in the session is not generated until the response is written back; CSRF validation will succeed silently.</div><div><br /></div><div>Maybe, if we should change validate_csrf_token's logic as:</div><div>- if session[_csrf] empty, then return false.</div><div>- if token is empty, then return false.</div><div>- if session[_csrf] == token, return true; otherwise return false.</div><div>After this change, if the session is new and it's POST method and form::load is called; CSRF validation will throw an exception (as expected).</div><div><br /></div><div>In the current situation, it seems that there is cross-site forgery attack possibility in very specific cases. But I am not sure if this is feature or bug.</div><div><br /></div><div>Thank you.</div><div><br /></div><div>Best regards,</div><div>Nazim Can.</div><div><br />-- <br />С уважением,<br />Назым-Джан Бэдир</div> |
From: Asog <ret...@gm...> - 2018-10-10 05:21:47
|
Hi all, How do you create your own thread and run it with CppCMS? Say my thread will take a time stamp every 15 minutes and store it into a string called LastTimestamp. This string is accessible to outsiders via CppCMS access. TIA. |
From: Manveru <ma...@ma...> - 2018-10-09 15:50:36
|
Geez, people. Use: response().out() << R" <https://en.cppreference.com/w/cpp/language/string_literal>html(<a href=" https://www.googl.com">Google</a><br>)html"; It's it neater? czw., 20 wrz 2018 o 17:07 Asog <ret...@gm...> napisał(a): > This works too, but not sure about neatness: > > response().out() << "<a href='" << "https://www.google.com" << > "'>Google</a><br>"; > > On Thu, Sep 20, 2018 at 10:59 PM Nazim Can Bedir < > naz...@ne...> wrote: > >> Hi, >> >> You forgot that you are writing code in C++, so you need to start and end >> string literal with " (double quote), and escape the inner quotes. >> >> response().out() << "<a href=\"https://www.google.com\">Google</a>"; >> >> Regards, >> Nazim Can. >> >> -- >> С уважением, >> Назым-Джан Бэдир >> >> 18:24, 20 September 2018, "hoang nguyen via Cppcms-users" < >> cpp...@li...>: >> >> Nazim, >> I tried the following code as you said and it failed: >> >> response().out() << <a href="https://www.google.com">Google</a>; >> >> What am I missing? >> -------------------------------------------- >> On Thu, 9/20/18, Nazim Can Bedir <naz...@ne...> wrote: >> >> Subject: Re: [Cppcms-users] How to link external URL with CppCMS? >> To: "cpp...@li..." < >> cpp...@li...> >> Date: Thursday, September 20, 2018, 5:07 PM >> >> Hello, >> 'url' template command is >> used to output address of url_mapper routes. If you want to >> create link for an external URL, you just need to use usual >> HTML; i.e. >> <a >> href="https://www.google.com">Google</a> >> Regards,Nazim Can. >> >> -- >> С >> уважением, >> Назым-Джан >> Бэдир >> >> 12:45, 20 >> September 2018, Asog >> <ret...@gm...>: >> >> >> Hello, >> I got my CppCMS page >> working following this >> tutorial >> (full >> code). However, it >> doesn't show how to link to an outside URL (i.e., >> www.google.com). >> Can someone point out to me how it can be done? TIA. >> >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> -----Inline Attachment Follows----- >> >> >> -----Inline Attachment Follows----- >> >> >> >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > -- Manveru jabber: ma...@ma... gg: 1624001 http://www.manveru.pl |
From: Asog <ret...@gm...> - 2018-10-04 17:27:46
|
OK, libz.so was not cross-compiled properly. Fixed it. On Thu, Oct 4, 2018 at 10:40 PM Asog <ret...@gm...> wrote: > Hello, > I try cross-compiling CppCMS after doing it with doing that with zlib and > pcre. > This is the contents of ToolChain.cmake file: > > SET(CMAKE_SYSTEM_NAME Linux) > SET(CMAKE_C_COMPILER {PATH_TO_LINARO}/bin/arm-linux-gnueabihf-gcc) > SET(CMAKE_CXX_COMPILER {PATH_TO_LINARO}/bin/arm-linux-gnueabihf-g++) > SET(CMAKE_FIND_ROOT_PATH {PATH_TO_LINARO}) > SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) > SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) > SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > > > And this is my cmake command: > > cmake -DCMAKE_TOOLCHAIN_FILE=ToolChain.cmake \ > -DLIB_PTHREAD:FILEPATH={PATH_TO_LINARO}/arm-linux-gnueabihf/libc/usr/lib/libpthread.so \ > -DPCRE_INCLUDE:PATH={HOME_DIR}/PCRE/include \ > -DPCRE_LIB:FILEPATH={HOME_DIR}/PCRE/lib/libpcre.so \ > -DPTHREAD_INC={PATH_TO_LINARO}/arm-linux-gnueabihf/libc/usr/include \ > -DZLIB_INCLUDE_DIR={HOME_DIR}/zlib-1.2.11/include \ > -DZLIB={HOME_DIR}/zlib-1.2.11/lib/libz.so \ > -DDISABLE_ICU_LOCALIZATION=ON \ > -DCMAKE_INCLUDE_PATH={DEST_CPPCMS_DIR}/include \ > -DCMAKE_LIBRARY_PATH={DEST_CPPCMS_DIR}/lib \ > -DCMAKE_INSTALL_PREFIX={DEST_CPPCMS_DIR} .. > > > It fails at 27% saying: > > [ 27%] Building CXX object CMakeFiles/cppcms.dir/src/daemonize.cpp.o > [ 27%] Linking CXX shared library libcppcms.so > /home/u1804/BBB/zlib-1.2.11/lib/libz.so: file not recognized: File format not recognized > collect2: error: ld returned 1 exit status > CMakeFiles/cppcms.dir/build.make:987: recipe for target 'libcppcms.so.1.2.1' failed > make[2]: *** [libcppcms.so.1.2.1] Error 1 > CMakeFiles/Makefile2:643: recipe for target 'CMakeFiles/cppcms.dir/all' failed > make[1]: *** [CMakeFiles/cppcms.dir/all] Error 2 > Makefile:162: recipe for target 'all' failed > make: *** [all] Error 2 > > Could someone tell me what I did wrong? TIA. > |
From: Asog <ret...@gm...> - 2018-10-04 15:40:33
|
Hello, I try cross-compiling CppCMS after doing it with doing that with zlib and pcre. This is the contents of ToolChain.cmake file: SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_C_COMPILER {PATH_TO_LINARO}/bin/arm-linux-gnueabihf-gcc) SET(CMAKE_CXX_COMPILER {PATH_TO_LINARO}/bin/arm-linux-gnueabihf-g++) SET(CMAKE_FIND_ROOT_PATH {PATH_TO_LINARO}) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) And this is my cmake command: cmake -DCMAKE_TOOLCHAIN_FILE=ToolChain.cmake \ -DLIB_PTHREAD:FILEPATH={PATH_TO_LINARO}/arm-linux-gnueabihf/libc/usr/lib/libpthread.so \ -DPCRE_INCLUDE:PATH={HOME_DIR}/PCRE/include \ -DPCRE_LIB:FILEPATH={HOME_DIR}/PCRE/lib/libpcre.so \ -DPTHREAD_INC={PATH_TO_LINARO}/arm-linux-gnueabihf/libc/usr/include \ -DZLIB_INCLUDE_DIR={HOME_DIR}/zlib-1.2.11/include \ -DZLIB={HOME_DIR}/zlib-1.2.11/lib/libz.so \ -DDISABLE_ICU_LOCALIZATION=ON \ -DCMAKE_INCLUDE_PATH={DEST_CPPCMS_DIR}/include \ -DCMAKE_LIBRARY_PATH={DEST_CPPCMS_DIR}/lib \ -DCMAKE_INSTALL_PREFIX={DEST_CPPCMS_DIR} .. It fails at 27% saying: [ 27%] Building CXX object CMakeFiles/cppcms.dir/src/daemonize.cpp.o [ 27%] Linking CXX shared library libcppcms.so /home/u1804/BBB/zlib-1.2.11/lib/libz.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status CMakeFiles/cppcms.dir/build.make:987: recipe for target 'libcppcms.so.1.2.1' failed make[2]: *** [libcppcms.so.1.2.1] Error 1 CMakeFiles/Makefile2:643: recipe for target 'CMakeFiles/cppcms.dir/all' failed make[1]: *** [CMakeFiles/cppcms.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: *** [all] Error 2 Could someone tell me what I did wrong? TIA. |
From: Asog <ret...@gm...> - 2018-10-02 12:23:29
|
Hello, How can I navigate between pages with a click on a cppcms::widgets::submit object? TIA. |
From: Asog <ret...@gm...> - 2018-10-01 18:02:11
|
I meant a click on a cppcms::widgets::submit object. On Mon, Oct 1, 2018 at 9:27 PM Asog <ret...@gm...> wrote: > Hello, > How do you send the user to another with a button click in CppCMS? > |
From: Asog <ret...@gm...> - 2018-10-01 14:27:41
|
Hello, How do you send the user to another with a button click in CppCMS? |
From: Asog <ret...@gm...> - 2018-09-27 15:31:46
|
Hello, How can you use POST with multiple buttons on a form to do different things? And how can you design the layout, sizing, coloring, background color for different buttons? TIA. |
From: Asog <ret...@gm...> - 2018-09-27 09:27:48
|
Found cppcms::widgets::password for the purpose. On Thu, Sep 27, 2018 at 11:36 AM Asog <ret...@gm...> wrote: > Hello, > Is there a way to hide user input in a text field like > cppcms::widgets::text? Thank you. > |
From: Asog <ret...@gm...> - 2018-09-27 04:36:50
|
Hello, Is there a way to hide user input in a text field like cppcms::widgets::text? Thank you. |
From: Asog <ret...@gm...> - 2018-09-26 14:00:42
|
Hi guys, I have been following the tutorials. Is there a way to translate existing HTML templates to CppCMS format? Is there a name for the format being used by the platform? TIA. |
From: Asog <ret...@gm...> - 2018-09-21 10:02:24
|
Hello, The `session.expire` link in this tutorial is dead: http://cppcms.com/wikipp/en/page/secure_programming#Sessions Session expiration There are two basic methods used for session expiration: fixed and renew. See session.expire <http://art-blog.no-ip.info/wikipp/en/page/cppcms_1x_config#session.expire> The art-blog.no-ip.info site is dead. |
From: Asog <ret...@gm...> - 2018-09-21 07:04:19
|
Hello, On the Sessions tutorial page, it says: Each type of expiration has its time limit (even browser one has its limit). It can be defined using session.timeout parameter. The default one is 24 hours. For example: view plain <http://cppcms.com/wikipp/en/page/cppcms_1x_sessions#>print <http://cppcms.com/wikipp/en/page/cppcms_1x_sessions#>? <http://cppcms.com/wikipp/en/page/cppcms_1x_sessions#> 1. "expire" : "renew", 2. "timeout" : 604800, 604800 is the number of seconds in a week. A day only has 86400 seconds. Could it be edited? |
From: Asog <ret...@gm...> - 2018-09-20 17:58:40
|
Hello, The upload files are listed here: http://cppcms.com/cppcms_ref/latest/ex_uploads.html However, I cannot find an Upload tutorial on the wiki page. Is there one that I can follow? Also, the order on the wiki page differs from that on the reference page after Using CppCMS forms tutorial. Is there any reason for it? Thanks!!!! |
From: Asog <ret...@gm...> - 2018-09-20 16:06:59
|
This works too, but not sure about neatness: response().out() << "<a href='" << "https://www.google.com" << "'>Google</a><br>"; On Thu, Sep 20, 2018 at 10:59 PM Nazim Can Bedir <naz...@ne...> wrote: > Hi, > > You forgot that you are writing code in C++, so you need to start and end > string literal with " (double quote), and escape the inner quotes. > > response().out() << "<a href=\"https://www.google.com\">Google</a>"; > > Regards, > Nazim Can. > > -- > С уважением, > Назым-Джан Бэдир > > 18:24, 20 September 2018, "hoang nguyen via Cppcms-users" < > cpp...@li...>: > > Nazim, > I tried the following code as you said and it failed: > > response().out() << <a href="https://www.google.com">Google</a>; > > What am I missing? > -------------------------------------------- > On Thu, 9/20/18, Nazim Can Bedir <naz...@ne...> wrote: > > Subject: Re: [Cppcms-users] How to link external URL with CppCMS? > To: "cpp...@li..." < > cpp...@li...> > Date: Thursday, September 20, 2018, 5:07 PM > > Hello, > 'url' template command is > used to output address of url_mapper routes. If you want to > create link for an external URL, you just need to use usual > HTML; i.e. > <a > href="https://www.google.com">Google</a> > Regards,Nazim Can. > > -- > С > уважением, > Назым-Джан > Бэдир > > 12:45, 20 > September 2018, Asog > <ret...@gm...>: > > > Hello, > I got my CppCMS page > working following this > tutorial > (full > code). However, it > doesn't show how to link to an outside URL (i.e., > www.google.com). > Can someone point out to me how it can be done? TIA. > > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > -----Inline Attachment Follows----- > > > -----Inline Attachment Follows----- > > > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Nazim C. B. <naz...@ne...> - 2018-09-20 15:59:28
|
Hi,<div><br /></div><div>You forgot that you are writing code in C++, so you need to start and end string literal with " (double quote), and escape the inner quotes.</div><div><br /></div><div>response().out() << "<a href=\"https://www.google.com\">Google</a>";</div><div><br /></div><div>Regards,</div><div>Nazim Can.<br /><br />-- <br />С уважением,<br />Назым-Джан Бэдир<br /><br />18:24, 20 September 2018, "hoang nguyen via Cppcms-users" <cpp...@li...>:<br /><blockquote><p>Nazim,<br />I tried the following code as you said and it failed:<br /><br />response().out() << <a href="<a href="https://www.google.com">https://www.google.com</a>">Google</a>;<br /><br />What am I missing?<br />--------------------------------------------<br />On Thu, 9/20/18, Nazim Can Bedir <<a href="mailto:naz...@ne...">naz...@ne...</a>> wrote:<br /><br /> Subject: Re: [Cppcms-users] How to link external URL with CppCMS?<br /> To: "<a href="mailto:cpp...@li...">cpp...@li...</a>" <<a href="mailto:cpp...@li...">cpp...@li...</a>><br /> Date: Thursday, September 20, 2018, 5:07 PM<br /><br /> Hello,<br /> 'url' template command is<br /> used to output address of url_mapper routes. If you want to<br /> create link for an external URL, you just need to use usual<br /> HTML; i.e.<br /> <a<br /> href="<a href="https://www.google.com">https://www.google.com</a>">Google</a><br /> Regards,Nazim Can.<br /><br /> -- <br /> С<br /> уважением,<br /> Назым-Джан<br /> Бэдир<br /><br /> 12:45, 20<br /> September 2018, Asog<br /> <<a href="mailto:ret...@gm...">ret...@gm...</a>>:<br /><br /><br /> Hello,<br /> I got my CppCMS page<br /> working following this<br /> tutorial<br /> (full<br /> code). However, it<br /> doesn't show how to link to an outside URL (i.e.,<br /> <a href="http://www.google.com">www.google.com</a>).<br /> Can someone point out to me how it can be done? TIA.<br /><br /><br /><br /> _______________________________________________<br /> Cppcms-users mailing list<br /> <a href="mailto:Cpp...@li...">Cpp...@li...</a><br /> <a href="https://lists.sourceforge.net/lists/listinfo/cppcms-users">https://lists.sourceforge.net/lists/listinfo/cppcms-users</a><br /><br /><br /> _______________________________________________<br /> Cppcms-users mailing list<br /> <a href="mailto:Cpp...@li...">Cpp...@li...</a><br /> <a href="https://lists.sourceforge.net/lists/listinfo/cppcms-users">https://lists.sourceforge.net/lists/listinfo/cppcms-users</a><br /><br /> -----Inline Attachment Follows-----<br /><br /><br /> -----Inline Attachment Follows-----<br /><br /><br /><br /><br />_______________________________________________<br />Cppcms-users mailing list<br /><a href="mailto:Cpp...@li...">Cpp...@li...</a><br /><a href="https://lists.sourceforge.net/lists/listinfo/cppcms-users">https://lists.sourceforge.net/lists/listinfo/cppcms-users</a><br /></p></blockquote></div> |
From: hoang n. <ngu...@ya...> - 2018-09-20 15:24:36
|
Nazim, I tried the following code as you said and it failed: response().out() << <a href="https://www.google.com">Google</a>; What am I missing? -------------------------------------------- On Thu, 9/20/18, Nazim Can Bedir <naz...@ne...> wrote: Subject: Re: [Cppcms-users] How to link external URL with CppCMS? To: "cpp...@li..." <cpp...@li...> Date: Thursday, September 20, 2018, 5:07 PM Hello, 'url' template command is used to output address of url_mapper routes. If you want to create link for an external URL, you just need to use usual HTML; i.e. <a href="https://www.google.com">Google</a> Regards,Nazim Can. -- С уважением, Назым-Джан Бэдир 12:45, 20 September 2018, Asog <ret...@gm...>: Hello, I got my CppCMS page working following this tutorial (full code). However, it doesn't show how to link to an outside URL (i.e., www.google.com). Can someone point out to me how it can be done? TIA. _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users -----Inline Attachment Follows----- -----Inline Attachment Follows----- |
From: Nazim C. B. <naz...@ne...> - 2018-09-20 10:30:49
|
Hello,<div><br /></div><div>'url' template command is used to output address of url_mapper routes. If you want to create link for an external URL, you just need to use usual HTML; i.e.</div><div><br /></div><div><a href="https://www.google.com">Google</a></div><div><br /></div><div>Regards,</div><div>Nazim Can.<br /><br />-- <br />С уважением,<br />Назым-Джан Бэдир<br /><br />12:45, 20 September 2018, Asog <ret...@gm...>:<br /><blockquote><div dir="ltr"> <div><span><span>Hello,<br />I got my CppCMS page working following </span></span><span><a href="http://cppcms.com/wikipp/en/page/cppcms_1x_tut_url_mapping"><span><span>this tutorial</span></span></a></span><span><span> (</span></span><span><a href="http://cppcms.com/cppcms_ref/1.1.0/ex_url_mapping____hello__cpp.html"><span><span>full code</span></span></a></span><span><span>). However, it doesn't show how to link to an outside URL (i.e., </span></span><span><a href="https://www.google.com"><span><span>www.google.com</span></span></a></span><span><span>). Can someone point out to me how it can be done? TIA.<br /></span></span></div> </div> <p>_______________________________________________<br />Cppcms-users mailing list<br /><a href="mailto:Cpp...@li...">Cpp...@li...</a><br /><a href="https://lists.sourceforge.net/lists/listinfo/cppcms-users">https://lists.sourceforge.net/lists/listinfo/cppcms-users</a><br /></p></blockquote></div> |
From: Asog <ret...@gm...> - 2018-09-20 09:45:30
|
Hello, I got my CppCMS page working following this tutorial <http://cppcms.com/wikipp/en/page/cppcms_1x_tut_url_mapping> (full code <http://cppcms.com/cppcms_ref/1.1.0/ex_url_mapping____hello__cpp.html>). However, it doesn't show how to link to an outside URL (i.e., www.google.com). Can someone point out to me how it can be done? TIA. |