Problem embedding html

1 view
Skip to first unread message

derMicha (wagn)

unread,
Aug 23, 2011, 10:54:50 AM8/23/11
to wagn...@googlegroups.com
Hi,

I use wagn 1.7.0, Apache, thin and MySQL.


I want to embed an Google calender in a HTML card. I tried it a few days agon successful. But now I have these problems:
1. all embedded HTML code seems to be parsed. This parser fails with HTML code like this:
<iframe src="https://www.google.com/calendar/embed?height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=evli-alle%40blablablabla-blablablabl ablabla.de&amp;color=%232F6213&amp;src=gev%40blablablabla-blablablablablabla.de&amp;color=%238C500B&amp;src=2hdr7sgtopscahqklf756e0o7kkqsrme%40import.calendar.google.com&amp;color=%23711616&amp;src=de.german%23holiday%40group.v.calendar.google.com&amp;color=%23711616&amp;src=q968q6bogn6mavg733864723n1satg4d%40import.calendar.google.com&amp;color=%23711616&amp;src=schulleitung%40blablablabla-blablablablablabla.de&amp;color=%231B887A&amp;src=p%23weather%40group.v.calendar.google.com&amp;color=%23691426&amp;src=e_2_de%23weeknum%40group.v.calendar.google.com&amp;color=%23711616&amp;ctz=Europe%2FBerlin" style=" border-width:0 " width="600" height="600" frameborder="0" scrolling="no"></iframe>
The error (see example) only occurs when I creat a new card. When I paste the above HTML code in an existing HTML card save breaks with out any displayed error message. Nothing will be saved then.


2. When I reduce the number of embedded calendars the parser has no problem, but the calender will not be displayed in most cases:
<iframe src="https://www.google.com/calendar/embed?height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=evli-alle%40blablablabla-blablablablablabla.de&amp;color=%232F6213&amp;ctz=Europe%2FBerlin" style=" border-width:0 " width="600" height="600" frameborder="0" scrolling="no"></iframe> 

That means I see sometimes the calendar. It seems to me as it depends on the embedded code. Possible problems with some special characters?


It is for me currently a big issue, because I had to present that on friday.


That problems makes it impossible to submit it as an Support Issue.

Result when adding #1 in a new HTML card:

Oops!
error saving TestKalender: Stack overflow in regexp matcher: /(!|\"\:|\"|\'|\]\()?(?:([a-zA-Z][-+.a-z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z\d:@&=+$,]|%[a-fA-F\d]{2})*)*)*)?(?:\?((?:[-_.~*'(a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?(?:(\#(?:[-_.~*'(a-zA-Z\d;\/?:@&=+$,\[\]]|%[a-fA-F\d]{2})*))?(?=\.?(?:\s|\)|\z|\<))/xn, /data/var/local/www/wiki/wagn/lib/chunks/uri.rb:88:in `gsub!'/data/var/local/www/wiki/wagn/lib/chunks/uri.rb:88:in `apply_to'/data/var/local/www/wiki/wagn/lib/wiki_content.rb:100:in `initialize'/data/var/local/www/wiki/wagn/lib/wiki_content.rb:100:in `each'/data/var/local/www/wiki/wagn/lib/wiki_content.rb:100:in `initialize'/data/var/local/www/wiki/wagn/lib/wagn/renderer.rb:457:in `new'/data/var/local/www/wiki/wagn/lib/wagn/renderer.rb:457:in `update_references'/data/var/local/www/wiki/wagn/lib/wagn/model/references.rb:22:in `update_references_on_create'/
data/var/local/www/wiki/wagn/app/models/user.rb:59:in `as'/data/var/local/www/wiki/wagn/lib/wagn/model/references.rb:21:in `update_references_on_create'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:178:in `send'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:178:in `evaluate_method'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:166:in `call'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:93:in `run'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:92:in `each'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:92:in `send'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:92:in `run'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/callbacks.rb:276:in `run_callbacks'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/callbacks.rb:344:in `callback'/var/lib/gems/1.8/gem
s/activerecord-2.3.11/lib/active_record/callbacks.rb:267:in `create_without_user'/data/var/local/www/wiki/wagn/vendor/plugins/userstamp/lib/userstamp.rb:36:in `create'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/base.rb:2927:in `create_or_update_without_callbacks'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/callbacks.rb:250:in `create_or_update'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/base.rb:2577:in `save_without_validation'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/validations.rb:1090:in `save_without_dirty'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/dirty.rb:79:in `save_without_transactions'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:229:in `send'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/dat
abase_statements.rb:136:in `transaction'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:182:in `transaction'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:196:in `save_without_trash'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:196:in `save_without_trash'/data/var/local/www/wiki/wagn/app/models/card.rb:111:in `save_without_permissions'/data/var/local/www/wiki/wagn/lib/wagn/model/permissions.rb:53:in `send'/data/var/local/www/wiki/wagn/lib/wagn/model/permissions.rb:53:in `run_checked_save'/data/var/local/www/wiki/wagn/lib/wagn/model/permissions.rb:42:in `save'/data/var/local/www/wiki/wagn/app/controllers/card_controller.rb:114:in `create'/var/lib/gems/1.8/gem
s/actionpack-2.3.11/lib/action_controller/base.rb:1333:in `send'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:1333:in `perform_action_without_filters'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/filters.rb:617:in `call_filters'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `ms'/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'/var/lib/gems/1.8/gems/activesupport-2.3.11/lib/active_support/core_ext/benchmark.rb:17:in `ms'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'/var/lib/gems/1.8/gems/ac
tionpack-2.3.11/lib/action_controller/flash.rb:151:in `perform_action'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:532:in `send'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:532:in `process_without_filters'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/filters.rb:606:in `process'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:391:in `process'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/base.rb:386:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/routing/route_set.rb:438:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:87:in `dispatch'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:121:in `_call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `
call'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:29:in `call'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:9:in `cache'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/query_cache.rb:28:in `call'/var/lib/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/string_coercion.rb:25:in `call'/var/lib/gems/1.8/gems/rack-1.1.2/lib/rack/head.rb:9:in `call'/var/lib/gems/1.8/gems/rack-1.1.2/lib/rack/methodoverride.rb:24:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/params_parser.rb:15:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/session/cookie_store.rb:99:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controlle
r/failsafe.rb:26:in `call'/var/lib/gems/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `call'/var/lib/gems/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `synchronize'/var/lib/gems/1.8/gems/rack-1.1.2/lib/rack/lock.rb:11:in `call'/var/lib/gems/1.8/gems/actionpack-2.3.11/lib/action_controller/dispatcher.rb:106:in `call'/var/lib/gems/1.8/gems/thin-1.2.11/lib/rack/adapter/rails.rb:69:in `call'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in `pre_process'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:57:in `process'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data'/var/lib/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'/var/lib/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `s
tart'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'/var/lib/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'/var/lib/gems/1.8/gems/thin-1.2.11/bin/thin:6/usr/bin/thin:19:in `load'/usr/bin/thin:19

422 Unprocessable Entity






Ethan McCutchen

unread,
Aug 23, 2011, 11:33:17 AM8/23/11
to wagn...@googlegroups.com
Hi Michael,

I think the problem is a very old bug with very long urls.  If you shorten the url of the calendar with tinyurl or the shortener of your choice, does that fix the issue?

We do need to fix that bug, but it always seems like there are other priorities!

- ethan

--
You received this message because you are subscribed to the Google Groups "Wagneers" group.
To post to this group, send email to wagn...@googlegroups.com.
To unsubscribe from this group, send email to wagneers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/wagneers?hl=en.



--
Ethan McCutchen
One of the Wagneers, Wagn.org

Wagn. How pioneers roll.

s: ethan.mccutchen
t: @intogreater


Reply all
Reply to author
Forward
0 new messages